Repository navigation
Draggable marker example - #12326
Draggable marker example#12326
Conversation
858a11c to
03a9fa3
Compare
There was a problem hiding this comment.
Is there a more kotlin friendly way to do string formatting?
There was a problem hiding this comment.
Loving these extension functions!
03a9fa3 to
d580765
Compare
|
I have tried to use |
| // Setting up markers icon, source and layer | ||
| mapboxMap.addImage(markerImageId, IconFactory.getInstance(this).defaultMarker().bitmap) | ||
| mapboxMap.addSource(source) | ||
| mapboxMap.addLayer(layer) |
There was a problem hiding this comment.
Steps to replicate the issue.
-
Use the API key which has a predefined style with some custom layers created using mapbox studio.
-
Apply the style using setStyleUrl()
-
Try to add this layer in
onStyleLoaded()callback.
It was throwing a segmentation fault error when I tried this.
There was a problem hiding this comment.
The issue was caused because I was trying to add the source before the style has loaded. I tried adding source and layer both in onStyleLoaded callback and its working.
There was a problem hiding this comment.
I'm glad to hear that @iamanvesh! Let us know if you run into any other issues.
Refs #2450.
Adds an example of how to build a class that is responsible for handling dragged symbols and disptaching callbacks with the drag state.
Also, adds Kotlin dependencies to the test app.