Our app has buttons to increase or decrease the zoom level of the map. When using those while the map's user location anchor point is not in the middle of the map, the map and the user location don't coordinate their movement. The map animates to its new zoom level bringing the user location to the middle of the map view while the user location annotation remains at its original screen position, then there is a separate animation as the map translates to put the user location annotation in the right place.
Steps to reproduce
Add a mapViewUserLocationAnchorPoint: delegate method which sets a user location off the center of the map (for instance, CGPointMake(mapView.bounds.size.width * 0.5, mapView.bounds.size.height * 0.8);)
Zoom the map programmaticaly ([self.mapView setZoomLevel:self.mapView.zoomLevel - 1 animated:false];, or animated:true, or self.mapView.zoomLevel -= 1;)
Expected behavior
Map zooms such that the user location annotation stays on the correct point on the map, and the user location doesn't move off the anchor point.
Actual behavior
Map zooms putting the user location in the center of the view, then after the zoom completes the map translates to put the user location under the user location annotation; while all of those animations happen, the user location annotation does not move from its screen position.
Configuration
Mapbox SDK versions: 5.3, 6.0, 6.1
iOS/macOS versions: iOS 13.6, 14 beta
Device/simulator models: Any -- tested on iPhone 11, iPhone 7 hardware, and a variety of simulators
Xcode version: 11.6, 12 beta
Our app has buttons to increase or decrease the zoom level of the map. When using those while the map's user location anchor point is not in the middle of the map, the map and the user location don't coordinate their movement. The map animates to its new zoom level bringing the user location to the middle of the map view while the user location annotation remains at its original screen position, then there is a separate animation as the map translates to put the user location annotation in the right place.
Steps to reproduce
mapViewUserLocationAnchorPoint:
delegate method which sets a user location off the center of the map (for instance,CGPointMake(mapView.bounds.size.width * 0.5, mapView.bounds.size.height * 0.8);
)[self.mapView setZoomLevel:self.mapView.zoomLevel - 1 animated:false];
, oranimated:true
, orself.mapView.zoomLevel -= 1;
)Expected behavior
Map zooms such that the user location annotation stays on the correct point on the map, and the user location doesn't move off the anchor point.
Actual behavior
Map zooms putting the user location in the center of the view, then after the zoom completes the map translates to put the user location under the user location annotation; while all of those animations happen, the user location annotation does not move from its screen position.
Configuration
Mapbox SDK versions: 5.3, 6.0, 6.1 iOS/macOS versions: iOS 13.6, 14 beta Device/simulator models: Any -- tested on iPhone 11, iPhone 7 hardware, and a variety of simulators Xcode version: 11.6, 12 beta