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.
MapKit parityFor feature parity with MapKit on iOS or macOSbugiOSMapbox Maps SDK for iOSmacOSMapbox Maps SDK for macOSnavigationFor the Mapbox Navigation SDK for Android or iOS or navigation use cases in general
+[MGLMapCamera cameraLookingAtCenterCoordinate:fromEyeCoordinate:eyeAltitude:] calculates a pitch in radians and passes it into -initWithCenterCoordinate:altitude:pitch:heading:, which expects the pitch in degrees, so the resulting MGLMapCamera has much less of a pitch than expected, the wrong heading, and a shorter viewing distance – so the eyeCoordinate parameter doesn’t have the intended effect. If the tangent happened to be negative, then MGLMapView would ignore the pitch altogether.
This significant discrepancy has apparently always been present in the MGLMapCamera implementation, since #2193. Unlike #12943, I think it would be tenable to fix the bug in-place, because the developer’s intent by using this method is pretty clear.
If you pass the same coordinate twice into +[MGLMapCamera cameraLookingAtCenterCoordinate:fromEyeCoordinate:eyeAltitude:], the resulting camera incorrectly has a pitch of about 1.5° (a right angle in radians, but interpreted as degrees) instead of 0° and a heading of NaN instead of 0°.
MapKit parityFor feature parity with MapKit on iOS or macOSbugiOSMapbox Maps SDK for iOSmacOSMapbox Maps SDK for macOSnavigationFor the Mapbox Navigation SDK for Android or iOS or navigation use cases in general
Activity
1ec5 commentedon Sep 27, 2018
If you pass the same coordinate twice into
+[MGLMapCamera cameraLookingAtCenterCoordinate:fromEyeCoordinate:eyeAltitude:], the resulting camera incorrectly has a pitch of about 1.5° (a right angle in radians, but interpreted as degrees) instead of 0° and a heading of NaN instead of 0°.