Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

selectAnnotation changes the tracking mode to None #9455

Closed
davidovich opened this issue Jul 7, 2017 · 2 comments
Closed

selectAnnotation changes the tracking mode to None #9455

davidovich opened this issue Jul 7, 2017 · 2 comments
Assignees
Labels
annotations Annotations on iOS and macOS or markers on Android iOS Mapbox Maps SDK for iOS MapKit parity For feature parity with MapKit on iOS or macOS

Comments

@davidovich
Copy link

Platform: ios
Mapbox SDK version: 3.6.0

Steps to trigger behavior

  1. Change the tracking mode to MGLUserTrackingModeFollow
  2. use the - (void)selectAnnotation:(id )annotation animated:(BOOL)animated API
  3. See the tracking mode change to MGLUserTrackingModeNone

Expected behavior

Selecting an annotation should not be coupled with the tracking mode. In MKMapKit, you can show an annotation while tracking.

I have a use case where the annotations are shown automatically while the user walks. The current hard requirement to return to no tracking breaks this.

A user setting through delegate should allow backward compatible support for the current behavior, while allowing to decouple the tracking mode from the annotation presentation.

Relevant code: https://github.com/mapbox/mapbox-gl-native/blame/ios-v3.6.0/platform/ios/src/MGLMapView.mm#L3794-L3797

Actual behavior

When the callout is shown, the tracking mode forcefully gets changed to MGLUserTrackingModeNone.

@boundsj boundsj added iOS Mapbox Maps SDK for iOS annotations Annotations on iOS and macOS or markers on Android MapKit parity For feature parity with MapKit on iOS or macOS labels Jul 7, 2017
@1ec5
Copy link
Contributor

1ec5 commented Aug 8, 2017

A user setting through delegate should allow backward compatible support for the current behavior, while allowing to decouple the tracking mode from the annotation presentation.

The current behavior is a departure from MapKit's behavior that isn't documented anywhere. Originally selecting an annotation would disable user tracking because callouts were unable to move with the annotation as the camera moves. However, we fixed that bug in #6676. I think we could reasonably switch to MapKit's behavior unconditionally without considering it a breaking change.

/cc @friedbunny

@friedbunny
Copy link
Contributor

I think we could reasonably switch to MapKit's behavior unconditionally without considering it a breaking change.

I’m not sure about how breaking it’ll be, but I agree that we should get rid of any obsolete selection/tracking mode interactions.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
annotations Annotations on iOS and macOS or markers on Android iOS Mapbox Maps SDK for iOS MapKit parity For feature parity with MapKit on iOS or macOS
Projects
None yet
Development

No branches or pull requests

4 participants