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.
Issue in mbgl when calculating points based on LatLng from the left side of the dateline after crossing the dateline from left to right. This is a follow up issue for #3995.
before crossing the dateline latLngToPoint is giving us Point[x=455.80133, y= 746.6456]
while after crossing the dateline latLngToPoint is giving us Point[x=393667.44, y=747.1837].
Normally we should see a small decrease in value not a big increase.
I can reproduce this issue in the iOS SDK. From my location in California, if I zoom out to z0 and pan west, the user location annotation disappears as soon as the map view’s center point crosses the antimeridian. The iOS SDK similarly positions the user location annotation using Transform::latLngToPoint() (via Map::pixelForLatLng() and -[MGLMapView convertCoordinate:toPointToView:]).
The user location and camera are LatLng [longitude=179.931, latitude=-16.945]
At that time the user location is converted to x: 77.64928 and y: 918.33923
Just before crossing the dateline the camera is on LatLng [longitude=179.99965655644286, latitude=-16.91392665410768] the values are x: 40.649273 and y: 906.33923.
Just after crossing the dateline the camera is on LatLng [longitude=-179.99907836847547, latitude=-16.91429282823615] the values are x: 3601749.0 and y: 618666.6
While it should be almost the same as before crossing, the x value should be a bit lower.
Here is the related video showing it,
note that the hash mentioned above contained this flashing regression from #4174.
which is no longer a problem on master.
Activity
tobrun commentedon Mar 1, 2016
Related method in
transform_state.cpp:which on his turn calls:
and
1ec5 commentedon Mar 1, 2016
I can reproduce this issue in the iOS SDK. From my location in California, if I zoom out to z0 and pan west, the user location annotation disappears as soon as the map view’s center point crosses the antimeridian. The iOS SDK similarly positions the user location annotation using
Transform::latLngToPoint()(viaMap::pixelForLatLng()and-[MGLMapView convertCoordinate:toPointToView:]).tobrun commentedon Mar 5, 2016
To make this problem a bit more visual, see this clip where I'm visualising the touch events.
brunoabinader commentedon Mar 6, 2016
@tobrun @1ec5 this should have been fixed in fd123de - could you please test using this hash?
tobrun commentedon Mar 6, 2016
@brunoabinader I'm on it, currently building specifically from that commit.
tobrun commentedon Mar 6, 2016
The user location and camera are LatLng [longitude=179.931, latitude=-16.945]
At that time the user location is converted to x: 77.64928 and y: 918.33923
Just before crossing the dateline the camera is on LatLng [longitude=179.99965655644286, latitude=-16.91392665410768] the values are x: 40.649273 and y: 906.33923.
Just after crossing the dateline the camera is on LatLng [longitude=-179.99907836847547, latitude=-16.91429282823615] the values are x: 3601749.0 and y: 618666.6
While it should be almost the same as before crossing, the x value should be a bit lower.
tobrun commentedon Mar 6, 2016
Here is the related video showing it,
note that the hash mentioned above contained this flashing regression from #4174.
which is no longer a problem on master.
brunoabinader commentedon Mar 7, 2016
On it 👍
brunoabinader commentedon Mar 7, 2016
👉 #4214.