Open fabian-guerra opened 4 years ago
This is an exploratory screenshot:
Adding another ornament starts to overload the screen. It may be possible that we add an icon instead but we will have to educate users about any new visual representation. The difference with the Apple Maps app's screenshot on top is that they utilize the navigation bar to display this control without overloading the screen. As Mapbox supports multiple use cases this is something we may not want to enforce.
However developers can implement [MGLMapViewDelegate mapView:didChangeLocationManagerAuthorization:]
delegate with a trivial controller to either direct users to the App's settings or keep precision off.
UIAlertController* alert = [UIAlertController alertControllerWithTitle:@"Mapbox GL works best with your precise location."
message:@"You'll get turn-by-turn directions."
preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *settingsAction = [UIAlertAction actionWithTitle:@"Turn On in Settings" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
}];
UIAlertAction *defaultAction = [UIAlertAction actionWithTitle:@"Keep Precise Location Off" style:UIAlertActionStyleDefault
handler:nil];
[alert addAction:settingsAction];
[alert addAction:defaultAction];
[self presentViewController:alert animated:YES completion:nil];
@knov What does the precise location ornament looks like? Is there a design? Because of the scalebar may occupy half of the screen width. There may be no enough space to put down a precise location when scalebar and Mapbox logo are placed at the same horizontal position.
I suggest putting the button on top of other ornaments at the bottom of the map, or something more appropriate.
Apple Maps integrates into their Navigation Bar an action controller with multiple options to change privacy settings. This is an exploratory ticket to understand how the Maps SDK can implement such functionality.
Apple Maps Nav Bar