I am trying to style my marker color using Mapbox's simple-style syntax within a L.geoJson function like so:
L.geoJson(myData, {
pointToLayer: L.mapbox.marker.style,
style: function(feature){
return { 'marker-color': '#ffcc00' }
}
});
According to mapbox docs, you can use L.mapbox.marker.style within L.geoJson for mapbox's default markers, but I can't seem to figure out how to style it with a different color.
There was a similar question posted here but I could not get it work in my client-side code.
Does anyone know how to do this? Here's a demo fiddle to get started.
Note: I know marker attributes can be added to the actual data that is being consumed, but I need to be able to style the marker within the client-side code because I won't have access to the geoJson featureCollection