[core] Ignore shortest path in Map::pixelForLatLng

This commit is contained in:
Bruno de Oliveira Abinader
2017-04-13 23:46:19 +03:00
committed by John Firebaugh
parent 98e2e59e5e
commit 09a2271576
4 changed files with 61 additions and 32 deletions

View File

@@ -621,12 +621,7 @@ void Transform::setGestureInProgress(bool inProgress) {
#pragma mark Conversion and projection
ScreenCoordinate Transform::latLngToScreenCoordinate(const LatLng& latLng) const {
// If the center and point longitudes are not in the same side of the
// antimeridian, we unwrap the point longitude so it would be seen if
// e.g. the next antimeridian side is visible.
LatLng unwrappedLatLng = latLng.wrapped();
unwrappedLatLng.unwrapForShortestPath(getLatLng());
ScreenCoordinate point = state.latLngToScreenCoordinate(unwrappedLatLng);
ScreenCoordinate point = state.latLngToScreenCoordinate(latLng);
point.y = state.size.height - point.y;
return point;
}