-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[android] Add jni binding for styleable snapshotter #16286
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.
I think we need to expose MapSnapshotterObserver and MapSnapshotter::style() to the Java side, so that the client can add / remove layers and sources, as well as subscribe to MapSnapshotterObserver events.
@alexshalamov This is the first idea come into my mind, but Style instance is created with NativeMapView in android sdk. @tobrun do you think it is possible to create Style from MapSnapshotter? |
@Chaoba current Style.java is tied-to and optimized-for the map implementation and will not match the requirements for this feature. It's not a peer object that has 1-on-1 relation with the c++ equivalent. For this iteration of the SDK, I feel we should support the full style API as |
1d9f4d9
to
827af4c
Compare
44e8367
to
1012f97
Compare
@pozdnyakov I could not figure out why scheduled lambda goes out of scope in caller thread before it is pushed to the target scheduler queue. Both 1 and 2 were not reliable. 3rd approach doesn't look nice, but works. |
@alexshalamov here I guess it shall be |
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.
few nits
- remove unused map from factory interfaces. Map is only needed for repaint.
382bd8b
to
bf50d79
Compare
This pr add jni binding for styleable napshotter.
The related android pr: mapbox/mapbox-gl-native-android#268