[BUG] Tile fallback feature throws error on failure when fallbackUrl
not defined
#1554
Labels
bug
This issue reports broken functionality or another error
What is the bug?
First thanks for the great library!
I upgraded to flutter_map 5.0.0 and now i am getting errors thrown if a tile image does not exist.
This error to be precise:
flutter: Invalid argument(s): No host specified in URI
After taking a deeper look, this error is being generated from
FlutterMapNetworkImageProvider
provider.When a tile does not exist on the remote server, the httpClient will throw an exception which will be caught and the
_loadAsync
will be called again with theuseFallback
argument. IT will try to use the fallback url, but when no fallback url is defined it will use an empty string. That however will throw aNo host specified in URI
error. Does it even make sense to retry if no fallback url is defined?How can we reproduce it?
Use the following tile provider:
Do you have a potential solution?
Maybe a retry should only be triggered if a fallback is set? What do you think?
Platforms
MacOS
Severity
Minimum: Allows normal functioning
The text was updated successfully, but these errors were encountered: