在 Leaflet 地图中,是否有可能从标准标记中移除阴影?
new L.Icon.Default()
:
https://github.com/Leaflet/Leaflet/blob/master/src/layer/marker/Marker.js#L10
因此,可以按照以下方式实现:var icon = new L.Icon.Default();
icon.options.shadowSize = [0,0];
var marker = new L.Marker(map.getCenter(), {icon : icon}).addTo(map);
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);