Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed bugs and added tests for FlutterMapNetworkImageProvider #1662

Merged
merged 3 commits into from
Sep 27, 2023
Merged

Fixed bugs and added tests for FlutterMapNetworkImageProvider #1662

merged 3 commits into from
Sep 27, 2023

Conversation

bramp
Copy link
Contributor

@bramp bramp commented Sep 25, 2023

Testing it fails and fallback appropriately under different http responses.

Currently the last test, "test load with invalid response (with successful fallback)" fails. The primary URL returns 200 OK but HTML not a image. The fallback URL is never attempted. Per the discussion on discord this may be a bug, however, it looks to fix this you need to go higher up the stack (I suspect TileImage) because the image isn't actually processed until then.

… it fails and fallback appropriately under different http responses.
@JaffaKetchup
Copy link
Member

Thanks for this, I'll see what I can do to fix the issue you mentioned in your description. Is it safe for me to work directly in this PR?

@bramp
Copy link
Contributor Author

bramp commented Sep 25, 2023

Feel free to do as you need.

@JaffaKetchup

This comment was marked as resolved.

…ider` failed to decode a non-image

Fixed linting issues
@JaffaKetchup JaffaKetchup changed the title Add a series of tests for the FlutterMapNetworkImageProvider Fixed bugs and added tests for FlutterMapNetworkImageProvider Sep 27, 2023
Copy link
Member

@JaffaKetchup JaffaKetchup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for this!

Note to self: some parts of the cancellable TP need changing to reflect this, and this needs adding to CHANGELOG.

@JaffaKetchup JaffaKetchup merged commit 3247d60 into fleaflet:master Sep 27, 2023
6 checks passed
@bramp bramp deleted the network_test branch October 2, 2023 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] TileLayer.fallbackUrl not attempted when FMNIP fails to decode a non-image
2 participants