summaryrefslogtreecommitdiff
path: root/platform/default/include/mbgl/map/map_snapshotter.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'platform/default/include/mbgl/map/map_snapshotter.hpp')
-rw-r--r--platform/default/include/mbgl/map/map_snapshotter.hpp22
1 files changed, 16 insertions, 6 deletions
diff --git a/platform/default/include/mbgl/map/map_snapshotter.hpp b/platform/default/include/mbgl/map/map_snapshotter.hpp
index df5711777d..3c2df20282 100644
--- a/platform/default/include/mbgl/map/map_snapshotter.hpp
+++ b/platform/default/include/mbgl/map/map_snapshotter.hpp
@@ -19,15 +19,25 @@ namespace style {
class Style;
} // namespace style
+class MapSnapshotterObserver {
+public:
+ virtual ~MapSnapshotterObserver() = default;
+
+ static MapSnapshotterObserver& nullObserver();
+ virtual void onDidFailLoadingStyle(const std::string&) {}
+ virtual void onDidFinishLoadingStyle() {}
+ virtual void onStyleImageMissing(const std::string&) {}
+};
+
class MapSnapshotter {
public:
- MapSnapshotter(std::pair<bool, std::string> style,
- Size size,
+ MapSnapshotter(Size size,
float pixelRatio,
- optional<CameraOptions> cameraOptions,
- optional<LatLngBounds> region,
- optional<std::string> localFontFamily,
- const ResourceOptions&);
+ const ResourceOptions&,
+ MapSnapshotterObserver&,
+ optional<std::string> localFontFamily = nullopt);
+
+ MapSnapshotter(Size size, float pixelRatio, const ResourceOptions&);
~MapSnapshotter();