summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Shalamov <alexander.shalamov@mapbox.com>2020-02-27 15:08:59 +0200
committerAlexander Shalamov <alexander.shalamov@mapbox.com>2020-03-04 22:54:21 +0200
commit55f6cb110bd30c3b8d71f2553b48b85b545b9f8c (patch)
tree1924af5a39ad343885252a77fd236792d274feb6
parent6d73ac71297c57bc616ecfccc5ba142b0df641b5 (diff)
downloadqtlocation-mapboxgl-55f6cb110bd30c3b8d71f2553b48b85b545b9f8c.tar.gz
[core] Expose Style from Snapshotter
-rw-r--r--platform/default/include/mbgl/map/map_snapshotter.hpp3
-rw-r--r--platform/default/src/mbgl/map/map_snapshotter.cpp9
2 files changed, 12 insertions, 0 deletions
diff --git a/platform/default/include/mbgl/map/map_snapshotter.hpp b/platform/default/include/mbgl/map/map_snapshotter.hpp
index 7742669c46..2f7a4e6c0c 100644
--- a/platform/default/include/mbgl/map/map_snapshotter.hpp
+++ b/platform/default/include/mbgl/map/map_snapshotter.hpp
@@ -46,6 +46,9 @@ public:
void setRegion(const LatLngBounds&);
LatLngBounds getRegion() const;
+ style::Style& getStyle();
+ const style::Style& getStyle() const;
+
using PointForFn = std::function<ScreenCoordinate (const LatLng&)>;
using LatLngForFn = std::function<LatLng (const ScreenCoordinate&)>;
using Attributions = std::vector<std::string>;
diff --git a/platform/default/src/mbgl/map/map_snapshotter.cpp b/platform/default/src/mbgl/map/map_snapshotter.cpp
index 95d5f3d75b..75914e079c 100644
--- a/platform/default/src/mbgl/map/map_snapshotter.cpp
+++ b/platform/default/src/mbgl/map/map_snapshotter.cpp
@@ -230,6 +230,7 @@ public:
}
Map& getMap() { return map; }
+ const Map& getMap() const { return map; }
SnapshotterRendererFrontend& getRenderer() { return frontend; }
private:
@@ -301,4 +302,12 @@ LatLngBounds MapSnapshotter::getRegion() const {
return impl->getMap().latLngBoundsForCamera(getCameraOptions());
}
+style::Style& MapSnapshotter::getStyle() {
+ return impl->getMap().getStyle();
+}
+
+const style::Style& MapSnapshotter::getStyle() const {
+ return impl->getMap().getStyle();
+}
+
} // namespace mbgl