This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
MGLMapCamera interprets viewing distance incorrectly #12943
Labels
bug
iOS
Mapbox Maps SDK for iOS
macOS
Mapbox Maps SDK for macOS
MapKit parity
For feature parity with MapKit on iOS or macOS
navigation
For the Mapbox Navigation SDK for Android or iOS or navigation use cases in general
+[MGLMapCamera cameraLookingAtCenterCoordinate:fromDistance:pitch:heading:]
is based on MapKit’s+[MKMapCamera cameraLookingAtCenterCoordinate:fromDistance:pitch:heading:]
. But even though thedistance
parameter is documented as “the straight-line distance from the viewpoint to thecenterCoordinate
”, it actually controls thealtitude
parameter, which is the height the viewpoint above the ground plane. This significant discrepancy has apparently always been present in the MGLMapCamera implementation, since #2193. Fixing it will likely require a semver-major release, but in the meantime it might be desirable to add a correct initializer alongside the buggy one./ref #12938
/cc @mapbox/maps-ios @d-prukop
The text was updated successfully, but these errors were encountered: