Closed friedbunny closed 4 years ago
We're on par with MKMapSnapshot as of #10163. Are you saying that we should provide a way to draw images on images or is the conversion between coordinate systems sufficient?
@frederoni I think we should do a couple things:
Look at enabling the composition of point and shape annotations, using existing classes, onto a map before it’s rendered into a raster image.
Both point and shape annotations are rendered by style layers, and snapshots don’t need on-the-fly addition/removal or interactivity. So once snapshots support runtime styling (#9914), MGLMapSnapshotter could translate annotations to style layers as they are added to the snapshot.
View-backed annotations could work similarly, except that we’d snapshot the view before adding it to the snapshot. (Yay overloaded terminology!)
Removing android label as https://github.com/mapbox/mapbox-gl-native/issues/9914 would be the same since we don't have the concept of a view annotation anymore on android.
This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.
Still valid.
Since this is stil open, I really want to make sure if Mapbox can create map snapshot with annotations already added on it. please take a look at my post: https://github.com/mapbox/mapbox-gl-native/issues/15618
This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.
It’s currently impossible/difficult to add annotations or shape overlays to snapshots — we should support this use-case, as it’s somewhat rare for developers to simply want a plain map image.
The current workaround for this use-case is to use our web static maps API, wrapped by something like MapboxStatic.swift, which does include direct methods for annotations/overlays.
Related: https://github.com/mapbox/mapbox-gl-native/issues/9914, which talks about adding runtime styling support to the snapshot APIs.
/cc @ivovandongen @tobrun @1ec5 @frederoni