summaryrefslogtreecommitdiff
path: root/include/mbgl
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2018-11-13 20:42:48 +0200
committerBruno de Oliveira Abinader <bruno@mapbox.com>2018-11-14 12:22:22 +0200
commitdb2e1b2e5fccd74ef8344ff70f04ea4e00b48d6b (patch)
tree38931822dff2458b420a3797c361ff6a8e6011c7 /include/mbgl
parentd44be9a91bbb9d241eff72aa90beb4b12976c47f (diff)
downloadqtlocation-mapboxgl-db2e1b2e5fccd74ef8344ff70f04ea4e00b48d6b.tar.gz
[core] Add RendererState::{pixelForLatLng,latLngForPixel}
Diffstat (limited to 'include/mbgl')
-rw-r--r--include/mbgl/renderer/renderer_state.hpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/include/mbgl/renderer/renderer_state.hpp b/include/mbgl/renderer/renderer_state.hpp
index 27985ae996..71011389ec 100644
--- a/include/mbgl/renderer/renderer_state.hpp
+++ b/include/mbgl/renderer/renderer_state.hpp
@@ -15,16 +15,22 @@ class RendererState {
public:
// Obtains a CameraOptions out of a given UpdateParameters object.
- static CameraOptions getCameraOptions(UpdateParameters&, const EdgeInsets& = {});
+ static CameraOptions getCameraOptions(const UpdateParameters&, const EdgeInsets& = {});
// Returns whether an image with the given ID exists from a given UpdateParamters object.
- static bool hasImage(UpdateParameters&, const std::string& id);
+ static bool hasImage(const UpdateParameters&, const std::string& id);
// Returns whether a layer with the given ID exists from a given UpdateParamters object.
- static bool hasLayer(UpdateParameters&, const std::string& id);
+ static bool hasLayer(const UpdateParameters&, const std::string& id);
// Returns whether a source with the given ID exists from a given UpdateParamters object.
- static bool hasSource(UpdateParameters&, const std::string& id);
+ static bool hasSource(const UpdateParameters&, const std::string& id);
+
+ // Obtains the geographical coordinate out of a given screen coordinate.
+ static ScreenCoordinate pixelForLatLng(const UpdateParameters&, const LatLng&);
+
+ // Obtains the screen coordinate out of a given geographical coordinate.
+ static LatLng latLngForPixel(const UpdateParameters&, const ScreenCoordinate&);
};
} // namespace mbgl