diff options
author | Alexander Shalamov <alexander.shalamov@mapbox.com> | 2020-02-27 15:08:59 +0200 |
---|---|---|
committer | Alexander Shalamov <alexander.shalamov@mapbox.com> | 2020-03-05 17:43:37 +0200 |
commit | 1577a6b53764e3093b31969cc69de41c7ebf2978 (patch) | |
tree | a281716e8db89ab21bb0395e4eef454da32f0f33 | |
parent | 29eff4028d9a17557c0aca5ce68c824335e1489e (diff) |
[core] Expose Style from Snapshotter
-rw-r--r-- | platform/default/include/mbgl/map/map_snapshotter.hpp | 3 | ||||
-rw-r--r-- | platform/default/src/mbgl/map/map_snapshotter.cpp | 9 |
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 7742669c4..2f7a4e6c0 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 95d5f3d75..75914e079 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 |