Repository navigation
Add runtime styling APIs on MapSnapshotter - #268
Conversation
|
@tobrun Can you review MapSnapshotStyle API? |
tobrun
left a comment
There was a problem hiding this comment.
While we aren't able to use the Style.java object itself (it's tightly coupled to a Map). I think we can reuse the Style#Builder to compose our style. This could be exposed through MapSnapshotter#Options. We will need to expose getters on the builder to get the values we need as we won't be creating an actual instance of the Style.java with build().
4fc9a75 to
dddb17e
Compare
|
@tobrun This pr is ready for review now. There are some tail works need to do:
|
11e3747 to
cb5adb6
Compare
|
Was able to hit a native crash while opening/closing some of the examples. The native crash is symbolicated with |
|
I am able to reproduce the crash too. It seem still happens during the deconstruction process. |
|
Find another crash by opening "Map Snapshotter with Marker" and back for several times. From the stacktrace, it is related with |
|
And for the previous crash, it can only reproduced with emulator. I have tried with my XiaoMi8, not able to reproduce it. |
|
Tested this out and is looking 👍 |
| nativeSetStyleUrl(styleUrl); | ||
| } | ||
|
|
||
| // TODO: Documentation |
We already have symbol layer example in https://github.com/mapbox/mapbox-gl-native-android/pull/268/files#diff-4707ad1bd4eb1163d43de02e0757f695R146, heatmap example added. |
|
@Chaoba @tobrun @alexshalamov have we been able to repro and fix mapbox/mapbox-gl-native#11669? |
* Add styleable snapshotter. * Add style API for snapshotter * Add observer interface to snapshotter * WIP Add styling to snapshotter activity * Update interface and implement addlayer functions. * Deprecate methods instead of removing * Implement addSource functions. * Implement addImage function * Still use the previous callback interface. * Expose onStyleDidloaded interface * Add setStyle method * Start native snapshotter from start method * Fix snapshotter test. * Fix check style * Keep the original interface * Update gl-native * Add demo for snapshotter heatmap layer * bump gl-native Co-authored-by: Alexander Shalamov <[email protected]> (cherry picked from commit da6d8a2)
* Add styleable snapshotter. * Add style API for snapshotter * Add observer interface to snapshotter * WIP Add styling to snapshotter activity * Update interface and implement addlayer functions. * Deprecate methods instead of removing * Implement addSource functions. * Implement addImage function * Still use the previous callback interface. * Expose onStyleDidloaded interface * Add setStyle method * Start native snapshotter from start method * Fix snapshotter test. * Fix check style * Keep the original interface * Update gl-native * Add demo for snapshotter heatmap layer * bump gl-native Co-authored-by: Alexander Shalamov <[email protected]> (cherry picked from commit da6d8a2)
Resovles #220
This pr add new api that could add runtime layer for snapshotter.
The jni binding pr: mapbox/mapbox-gl-native#16286