diff options
Diffstat (limited to 'src/mbgl/map/map.cpp')
-rw-r--r-- | src/mbgl/map/map.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mbgl/map/map.cpp b/src/mbgl/map/map.cpp index 1b4176db7a..32bc07995d 100644 --- a/src/mbgl/map/map.cpp +++ b/src/mbgl/map/map.cpp @@ -634,6 +634,12 @@ ScreenCoordinate Map::pixelForLatLng(const LatLng& latLng) const { return impl->transform.latLngToScreenCoordinate(unwrappedLatLng); } +ScreenCoordinate Map::pixelForLatLngRaw(const LatLng& latLng) const { + // This method, in comparison to the Map::pixelForLatLng, will not unwrap point's longitude + // and always return values relative to the center of the screen + return impl->transform.latLngToScreenCoordinate(latLng); +} + LatLng Map::latLngForPixel(const ScreenCoordinate& pixel) const { return impl->transform.screenCoordinateToLatLng(pixel); } |