mapbox-gl-native
mapbox-gl-native copied to clipboard
Panning during animated annotation view movement causes view to stick
Platform: iOS Mapbox SDK version: v3.5.0
Steps to trigger behavior
- Add an annotation view.
- Animate it to move to a location that is offscreen.
MGLPointAnnotation *annot = [[MGLPointAnnotation alloc] init];
annot.coordinate = self.mapView.centerCoordinate;
[self.mapView addAnnotation:annot];
CGPoint point = CGPointMake(-200, CGRectGetMidY(self.view.bounds));
CLLocationCoordinate2D coord = [self.mapView convertPoint:point toCoordinateFromView:self.view];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[UIView animateWithDuration:10 animations:^{
annot.coordinate = coord;
}];
});
- Pan the map view.
Expected behavior
The MGLAnnotationView would follow its original path within the map view.
Actual behavior

The annotation view generally continues to follow its original animation path within the view. The coordinates may update after a few seconds, and the annotation will end up at the original destination.
cc @boundsj
This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.