From 026b6d4c01a3d96af9629cc1790373137ecab950 Mon Sep 17 00:00:00 2001 From: Bruno de Oliveira Abinader Date: Mon, 7 Mar 2016 18:07:23 +0200 Subject: [core] Coordinate wrapping fixes - Make returning LatLngs unwrapped by default. - PointAnnotation and ShapeAnnotation are always wrapped so they can be selected via intersection from the visible tile boundaries. - Fixes LatLng::wrap() calculation. - Fixes LatLng::unwrapForShortestPath() calculation. The new unwrapForShortestPath algorithm unwraps the start coordinate either forwards or backwards depending on the end coordinate value, so we can always cross the antimeridian when needed and still obtain a wrapped end coordinate in the end. Fixes #4214. --- src/mbgl/util/tile_cover.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mbgl/util/tile_cover.cpp') diff --git a/src/mbgl/util/tile_cover.cpp b/src/mbgl/util/tile_cover.cpp index 0fae940271..6efff4bb57 100644 --- a/src/mbgl/util/tile_cover.cpp +++ b/src/mbgl/util/tile_cover.cpp @@ -23,7 +23,7 @@ public: } static TileCoordinate fromScreenCoordinate(const TransformState& state, double zoom, const ScreenCoordinate& point) { - return fromLatLng(state, zoom, state.screenCoordinateToLatLng(point, LatLng::Unwrapped)); + return fromLatLng(state, zoom, state.screenCoordinateToLatLng(point)); } }; -- cgit v1.2.1