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
Attempt to set a position just after the map controller has been initialized. The latitude, and only the latitude will be off by some degrees. See this video:
Weird-Set-Lat-1.mp4
A few indicators:
It is reproducible on tablets, the Android version or the manufacturer does not seem to matter. It is not always reproducible on first try, sometimes, it takes a few. On smartphones, noone was able to reproduce this issue so far.
It is reproducible only if the latitude that should be set is above a certain magic number. The latitude will then always be set to exactly that magic latitude if it is greater than that number. The exact number seems to differ for different people (maybe related to screen dimension or ratio?)
For me (htc Nexus 9, Android 7) it was somewhere at latitude 51.32, as shown in the video
For @cyclingcat (Samsung Galaxy Tab A (2016), Android 8.1), it was latitude 45.653
For the southern hemisphere, the issue is mirror-inverted: If I'd pan to latitude -80.0, this bug will let the view zoom to latitude -51.32 for my tablet
ENVIRONMENT:
Android, various versions
Tangram-ES 0.16.0. Reproducible with earlier versions
HOW I CAN BE SURE IT IS NOT A STREETCOMPLETE ISSUE?
As strange as this issue sounds, I actually have a hypothesis just from reading this description of the issue. I suspect that this is a consequence of some view logic we have that prevents the view from extending too far past the edge of the map projection.
This would explain why it only affects latitude (longitude wraps so we only apply this logic to latitude), why it is mirrored across the equator, and why the latitude depends on screen size. If I'm right, this should be an easy fix - probably just need to change the order of some operations.
REPRODUCTION
Attempt to set a position just after the map controller has been initialized. The latitude, and only the latitude will be off by some degrees. See this video:
Weird-Set-Lat-1.mp4
A few indicators:
ENVIRONMENT:
HOW I CAN BE SURE IT IS NOT A STREETCOMPLETE ISSUE?
Before line 171 of CameraManager.kt, I added the following code:
This is the only place in my app where
MapController::updateCameraPosition
is called.The following and nothing else was logged while I created the above video:
In other words, the correct latitude is passed to Tangram-ES
The text was updated successfully, but these errors were encountered: