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

Should attempt to display online map when user regains internet connection #350

Open
achou11 opened this issue May 14, 2024 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@achou11
Copy link
Member

achou11 commented May 14, 2024

Extracted from #318 (review)

Important note: this is only in the case that the user DOES NOT have a custom background map installed already, as displaying that always takes precedence over online map and offline fallback map, regardless of internet connection.

What currently happens

When the user opens the app without internet connection, they will see the offline fallback map. If internet connection is restored while the app is opened, the offline fallback is still displayed and there is no attempt to request the online map. The user must restart the app in order for the online map to be displayed. This is the same behavior as Mapeo Mobile.

Proposed change

If the app is open and the user regains internet connection, we should attempt to display the online map instead of the fallback offline map.

The implementation of this is pretty straightforward. It's a matter of telling the MapView to request a new style url (can be done using something as simple as appending a search param to the style url), in which case the online style.json will be returned and used.

@achou11 achou11 added the enhancement New feature or request label May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant