Remove shadow from standard marker in leaflet maps?
If you just want a simpler, more lightweight icon, try using divIcon:
var myIcon = L.divIcon({className: 'my-div-icon'});
// you can set .my-div-icon styles in CSS
L.marker([50.505, 30.57], {icon: myIcon}).addTo(map);
In source code new L.Icon.Default()
is used:
https://github.com/Leaflet/Leaflet/blob/master/src/layer/marker/Marker.js#L10
So, it can be achieved following way:
var icon = new L.Icon.Default();
icon.options.shadowSize = [0,0];
var marker = new L.Marker(map.getCenter(), {icon : icon}).addTo(map);