-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great overall!
You'll find this interesting @mapbox/navigation-ios @mapbox/navigation-android . |
a06a12d
to
3faae80
Compare
7e91d87
to
cbca768
Compare
Map and renderer / orchestrator should be able to run on a separate threads, however, legacy AnnotationManager is shared between Map and Renderer, therefore is not a thread safe. Until AnnotationManager is deprecated and removed from a code-base, use it only via weak pointers.
cbca768
to
1229932
Compare
Move renderer to a separate thread while keeping map on a client thread.
6c2e5b5
to
ecc5376
Compare
The clusterProperties contain only few elements at most.
5c90442
to
341ce4b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
} else { | ||
style = std::make_pair(false, jni::Make<std::string>(_env, styleURL)); | ||
snapshotter->setStyleJSON(jni::Make<std::string>(_env, styleURL)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be a call to setStyleURL()
rather than setStyleJSON()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, this is taken care of in #16286.
Styleable MapSnapshotter
This PR provides means of modifying style of a MapSnapshotter. The new API enables several use-cases, such as: adding route overlays, removing extra information (layers) from a base style, adding custom images that are missing from a style.
In a follow-up PR, new constructor for a
MapSnapshotter
could be added that takes existingMap
as a parameter, so that snapshotter could re-use already created / parsed style.Changes:
MapSnapshotter::cancel
methodAnnotationManager
from reference to weak_ptr, as it is owned by a Map, yet, acessed by a renderer.Adaptation for iOS / macOS / Android platforms
iOS / macOS adaptation: https://github.com/mapbox/mapbox-gl-native-ios/compare/alexshalamov_styleable_snapshotter
Android adaptation: in this PR
Launch Checklist
@mapbox/maps-android @mapbox/maps-ios @mapbox/core-sdk
if this PR adds or updates a public APIneeds changelog
label if a changelog is needed (remove label when added)/cc @mapbox/maps-android @mapbox/maps-ios @mapbox/core-sdk