This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Updating "MGLPointAnnotation" coordinate does not change annotation placement on a map #1980
Comments
For now, the workaround is to remove the annotation and add it back at the new coordinates. |
It seems that the workaround would be affected by issue #1688. |
1ec5
added a commit
that referenced
this issue
Apr 17, 2016
MGLMapView observes changes to the coordinate property of each MGLAnnotation added to it. Changing the coordinate property in a KVO-compliant way causes the annotation to be relocated and its callout view, if present, to be dismissed. To avoid observing the same annotation twice yet also avoid expensive lookups when adding or removing annotations, MGLMapView indexes added point annotations in an NSMutableSet. In iosapp, tapping a callout view moves the selected annotation to the center of the screen and deselects it. Fixes #1980.
The fix for this issue is ready for review: #3835. |
1ec5
added a commit
that referenced
this issue
Apr 19, 2016
MGLMapView observes changes to the coordinate property of each MGLAnnotation added to it. Changing the coordinate property in a KVO-compliant way causes the annotation to be relocated and its callout view, if present, to be dismissed. To avoid observing the same annotation twice yet also avoid expensive lookups when adding or removing annotations, MGLMapView indexes added point annotations in an NSMutableSet. In iosapp, tapping a callout view moves the selected annotation to the center of the screen and deselects it. Fixes #1980.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Mapbox GL 0.5.1
The text was updated successfully, but these errors were encountered: