You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you open the app while internet is disconnected and then it becomes connected, the map does not update to reflect the online map style. You have to restart the app in order for the map to show.
Context for why this happens:
We proxy the StyleJSON URL using a embedded http server that runs as part of the app. As part of this proxying, we dynamically provide different StyleJSON responses based the success of a preliminary http request to the relevant URLs. So at the time of when we request the StyleJSON to use for the mapping library, if the internet connection is unavailable when attempting to make the upstream online style request, we serve the StyleJSON for the offline fallback map and the mapping library uses that to make requests for tiles and other assets.
At the moment, we don't attempt re-request the StyleJSON response to use from the proxy upon internet connection changes, meaning that once the internet connection is available again, the mapping library still uses the StyleJSON that's associated with the offline fallback map.
To Reproduce
Fresh install
Turn off internet connection (e.g turn on airplane mode)
Open app
Turn on internet connection (e.g. turn off airplane mode)
Expected behavior
Ideally after (4), the map should refresh such that you're no longer viewing the fallback offline map and instead viewing the default online map style.
A note for potential implementers: while I think it's clear what the desired behavior is when going from disconnected to connected, I think we do not want to apply the inverse in the case of going from connected to disconnected i.e. if you open the app while connected to internet and then you become disconnected, we should still show as much of the online style as possible (which is mostly handled via caching in the mapping library) and not completely update the map such that it shows the offline fallback map.
Smartphone
Device: Pixel 6
OS: Android 15
The text was updated successfully, but these errors were encountered:
Describe the bug
If you open the app while internet is disconnected and then it becomes connected, the map does not update to reflect the online map style. You have to restart the app in order for the map to show.
Context for why this happens:
We proxy the StyleJSON URL using a embedded http server that runs as part of the app. As part of this proxying, we dynamically provide different StyleJSON responses based the success of a preliminary http request to the relevant URLs. So at the time of when we request the StyleJSON to use for the mapping library, if the internet connection is unavailable when attempting to make the upstream online style request, we serve the StyleJSON for the offline fallback map and the mapping library uses that to make requests for tiles and other assets.
At the moment, we don't attempt re-request the StyleJSON response to use from the proxy upon internet connection changes, meaning that once the internet connection is available again, the mapping library still uses the StyleJSON that's associated with the offline fallback map.
To Reproduce
Expected behavior
Ideally after (4), the map should refresh such that you're no longer viewing the fallback offline map and instead viewing the default online map style.
A note for potential implementers: while I think it's clear what the desired behavior is when going from disconnected to connected, I think we do not want to apply the inverse in the case of going from connected to disconnected i.e. if you open the app while connected to internet and then you become disconnected, we should still show as much of the online style as possible (which is mostly handled via caching in the mapping library) and not completely update the map such that it shows the offline fallback map.
Smartphone
The text was updated successfully, but these errors were encountered: