summaryrefslogtreecommitdiff
path: root/platform/default/mbgl/map/map_snapshotter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'platform/default/mbgl/map/map_snapshotter.cpp')
-rw-r--r--platform/default/mbgl/map/map_snapshotter.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/platform/default/mbgl/map/map_snapshotter.cpp b/platform/default/mbgl/map/map_snapshotter.cpp
index 3e930c31f1..7b4ec5913b 100644
--- a/platform/default/mbgl/map/map_snapshotter.cpp
+++ b/platform/default/mbgl/map/map_snapshotter.cpp
@@ -76,10 +76,21 @@ void MapSnapshotter::Impl::snapshot(ActorRef<MapSnapshotter::Callback> callback)
return transform.latLngToScreenCoordinate(unwrappedLatLng);
}};
+ // Collect all source attributions
+ std::vector<std::string> attributions;
+ for (auto source : map.getStyle().getSources()) {
+ auto attribution = source->getAttribution();
+ if (attribution) {
+ attributions.push_back(*attribution);
+ }
+ }
+
+ // Invoke callback
callback.invoke(
&MapSnapshotter::Callback::operator(),
error,
error ? PremultipliedImage() : frontend.readStillImage(),
+ std::move(attributions),
std::move(pointForFn)
);
});