I'm trying to override existing default marker icon with the custom one. I've defined parameters in a variable:
var ratIcon = L.icon({
iconUrl: 'http://andywoodruff.com/maptime-leaflet/rat.png',
iconSize: [60,50]
});
and the icon is applied to the through the pointToLayer option, which specifies a function:
pointToLayer: function(feature,latlng){
return L.marker(latlng,{icon: leafIcon});
}
but there are still default marker icons -> Plunker What I'm doing wrong?
In the last example is what I want to show.