I’m new to mapbox and need help about customizing the marker.
I have uploaded a csv file to my map through omnivore
using this code:
omnivore.csv('LL62AP0720.csv')
.addTo(map);
The csv contains 600 records.
How can I customize the marker to my own image?
I created the marker image in photoshop and how can I apply it to the map?
Thanks!
I tried writing these code:
omnivore.csv('LL62AP0720.csv')
.on('ready',function(layer) {
this.eachLayer(function(marker){
marker.setIcon(L.mapbox.marker.icon({
'marker-color':'#ff8888',
}));
});
Is there a way to import the local image to the marker? I think I should add something after the ‘marker-color’ code, but I don’t know what is the right code.
2
Answers
Try with this, see this example
Use some external library, which could enable you to write HTML/CSS/JavaScript to fully customized marker just like implementing other parts of the page, like one navbar.
http://easysublease.org/mapcoverjs/