You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Changing coordinate of custom class conforming to MGLAnnotation does not move annotation on map #5720
Also, is locationAnnotation an instance of MGLPointAnnotation or is it an instance of a subclass of MGLPointAnnotation? (Be sure to verify that it's the type you expect at runtime.) MGLPointAnnotation itself does have a KVO-compliant implementation, but it's possible for a subclass to have a non-compliant implementation.
changed the title [-]MGLMapView Still does not update the Annotation when the Coordinate property of the Annotation is changed.[/-][+]Changing coordinate of custom class conforming to MGLAnnotation does not move annotation on map[/+]on Oct 1, 2016
I’m unable to reproduce this problem in iOS SDK v3.4.0-beta.7 or macOS SDK v0.3.0-rc.1. I tried setting the coordinate property of an instance of MGLPointAnnotation, an instance of a subclass of MGLPointAnnotation, and an instance of a subclass of NSObject that conforms to MGLAnnotation. In all three scenarios, the annotation correctly moves on both iOS and macOS.
@Gerz-inc, I don’t see any issues with the code that you’ve posted, but have you verified that the -setPosition: setter you’ve implemented gets called at the expected times?
Activity
1ec5 commentedon Jul 19, 2016
What version of the SDK are you using?
Also, is locationAnnotation an instance of MGLPointAnnotation or is it an instance of a subclass of MGLPointAnnotation? (Be sure to verify that it's the type you expect at runtime.) MGLPointAnnotation itself does have a KVO-compliant implementation, but it's possible for a subclass to have a non-compliant implementation.
Gerz-inc commentedon Aug 1, 2016
@charliecliff I have the same problem as you have won it?
1ec5 commentedon Aug 1, 2016
Via #5755, there are also reports of the annotation image also failing to update. (Both the image and coordinate are updated via the same mechanism.)
ChrisXu commentedon Oct 1, 2016
It's also not working for me.
The workaround is to subclass by
MGLPointAnnotation, then it's working now.[-]MGLMapView Still does not update the Annotation when the Coordinate property of the Annotation is changed.[/-][+]Changing coordinate of custom class conforming to MGLAnnotation does not move annotation on map[/+]Gerz-inc commentedon Jan 16, 2017
@1ec5
That's configuration not update annotation immediately. Maybe you can help?
Gerz-inc commentedon Jan 16, 2017
@1ec5
[self setCoordinate:coord];Helped me
1ec5 commentedon Jan 17, 2017
I’m unable to reproduce this problem in iOS SDK v3.4.0-beta.7 or macOS SDK v0.3.0-rc.1. I tried setting the
coordinateproperty of an instance of MGLPointAnnotation, an instance of a subclass of MGLPointAnnotation, and an instance of a subclass of NSObject that conforms to MGLAnnotation. In all three scenarios, the annotation correctly moves on both iOS and macOS.@Gerz-inc, I don’t see any issues with the code that you’ve posted, but have you verified that the
-setPosition:setter you’ve implemented gets called at the expected times?stale commentedon Nov 24, 2018
This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.