Closed Markovicho closed 2 years ago
@Markovicho I should look into distance calculations properly some time but on top of my head, I think the difference here might be mercator meters
vs real world meters
. or in other words, impact of latitude
on the distance calculations. a quick test for this might be trying it somewhere close to equator and then somewhere at extreme latitude.
Is that circle 90 units wide in unity space? maybe you can try to scale it by;
Mathf.Cos(Mathf.Deg2Rad * (float)map.CenterLatitudeLongitude.x)
If I'm not wrong, this was the latitude compensation formula 🤔
@Markovicho can you contact me via email; baran.kahyaoglu@mapbox.com
or twitter brnkhy
?
@Markovicho I should look into distance calculations properly some time but on top of my head, I think the difference here might be
mercator meters
vsreal world meters
. or in other words, impact oflatitude
on the distance calculations. a quick test for this might be trying it somewhere close to equator and then somewhere at extreme latitude.Is that circle 90 units wide in unity space? maybe you can try to scale it by;
Mathf.Cos(Mathf.Deg2Rad * (float)map.CenterLatitudeLongitude.x)
If I'm not wrong, this was the latitude compensation formula 🤔
this did the trick. Fits now perfectly :-) thx @brnkhy
useful informations / sdk version
Settings in AbstractMap
Scenario
Test setup
Expectation
Whats the result?
I don't really get the issue here. Is there something fundamentally wrong in my assumptions or is this an bug in the framework? @brnkhy @Entryist
by the way setting the Scaling-Option to WorldScale results in gaps between the tiles:
best regards and thanks in advance for any help