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

Programmatically changing the visible map region deselects selected annotation #6483

Closed
danielamitay opened this issue Sep 27, 2016 · 2 comments
Labels
annotations Annotations on iOS and macOS or markers on Android feature iOS Mapbox Maps SDK for iOS

Comments

@danielamitay
Copy link

Platform: iOS
Mapbox SDK version: v3.3.4

Steps to trigger behavior

  1. Have annotations on screen, with callouts supported
  2. Tap on an annotation, -mapView:didSelectAnnotationView: will be called
  3. Programmatically center the map on the selected annotation

Expected behavior

You should be able to move the map around (at a minimum programmatically, but even user interaction) while an annotation is selected, and it should remain selected. This is also how MKMapView works, you can select an annotation and programmatically center/move the map, and it will remain active. Even user map moves allows the annotation to remain active unless programmatically deselected or a user tap, or another annotation being selected.

Actual behavior

The annotation will be immediately deselected.

MGLMapView is deselecting the annotation here: https://github.com/mapbox/mapbox-gl-native/blob/master/platform/ios/src/MGLMapView.mm#L4432-L4437

@boundsj boundsj added feature iOS Mapbox Maps SDK for iOS annotations Annotations on iOS and macOS or markers on Android labels Sep 27, 2016
@boundsj
Copy link
Contributor

boundsj commented Sep 27, 2016

Thanks @danielamitay. This is tracked in #3154 and a related issue is #6284.

@boundsj boundsj closed this as completed Sep 27, 2016
@danielamitay
Copy link
Author

Ah sorry my search-fu isn't what it used to be! :(

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 feature iOS Mapbox Maps SDK for iOS
Projects
None yet
Development

No branches or pull requests

2 participants