We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9910e1b commit b41ae68Copy full SHA for b41ae68
sdkproject/Assets/Mapbox/Unity/Map/AbstractMap.cs
@@ -26,7 +26,8 @@ public class MapScalingAtWorldScaleStrategy : IMapScalingStrategy
26
{
27
public void SetUpScaling(AbstractMap map)
28
29
- map.SetWorldRelativeScale(Mathf.Cos(Mathf.Deg2Rad * (float)map.CenterLatitudeLongitude.x));
+ var scaleFactor = Mathf.Pow(2, (map.AbsoluteZoom - map.InitialZoom));
30
+ map.SetWorldRelativeScale(scaleFactor * Mathf.Cos(Mathf.Deg2Rad * (float)map.CenterLatitudeLongitude.x));
31
}
32
33
0 commit comments