Show user's location on the maps #5
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Here's a suggested improvement to the app that hopefully you'll consider!
The maps are a great feature of the app, but I find it tricky to use them without knowing where I am on the map so I thought I'd have a go at adding that functionality!
Basically I've just requested 'while in use' location permission when the user opens a map screen so they're only asked for permission if they actually want to go to the maps. The user is prompted over the map if they want to give permission once, always when the app is running or decline completely.
If they give permission for the location to be used once their location will show on the map for the current app 'run' and then they'll be prompted again the next time they restart the app if they want to give permission again or always when the app is running, or decline.
Here's how it looks with the default user location annotation being used:

I wondered whether it was worth putting a little banner above or below the map for any users that decline access to the location suggesting they could get their location on the map by providing access, but didn't want to make this PR too big by adding that straight away (chances are they'd know it would be possible anyway!).
(There's also a little fix for a crash I spotted on the 'all locations' screen when no data had downloaded)