I am trying to add new attributes to a marker in Mapbox, extending the classes is getting a little messy.
What is the best way to add new attributes to a marker?
I am trying to add new attributes to a marker in Mapbox, extending the classes is getting a little messy.
What is the best way to add new attributes to a marker?
Starting with
4.1.0
we introduced marker views. These extend the Android View class and allow you to create your own marker adapter. I've created a good example doing this you can find in the demo app. I'll post some of the snippets of code here but it might be easier just looking at the source code on Github.Adapter:
PulseMarkerView:
and lastly, PulseMarkerOptions:
Essentially this exposes the markerViews background so that we can pulse (animate) it but you can setup your own attributes. More examples of this being done can be found in the testapp. Hope this is what you were looking for.