# how to customize the marker using leaflet

I am adding markers to the map as below:

var markers = new L.LayerGroup();


I have my own marker icons.Can someone tell me how to add those icons rather than default.....

-
Downvote: I am not a fan of answering with “read the docs”, but there is a limit to draw somewhere. –  MattiSG Oct 25 '12 at 19:40

var markers = new L.LayerGroup();
var myIcon = L.icon({
iconUrl: 'my-icon.png', // pull out values as desired from the feature feature.properties.style.externalGraphic.
iconSize: [38, 95],
iconAnchor: [22, 94],
popupAnchor: [-3, -76],