change leaflet marker icon

后端 未结 4 1938
醉梦人生
醉梦人生 2021-02-20 04:17

I am using Leaflet Slider, of Dennis Wilhelm, to show changes in data on a Leaflet map.

I am trying to change the change the marker icon but not getting it right. So,How

4条回答
  •  天涯浪人
    2021-02-20 04:52

    var century21icon = L.icon({
        iconUrl: 'https://i.ibb.co/sJrMTdz/favicon-32x32.png',
        iconSize: [20, 20]
        });
    var maker = L.marker([25.045403,121.526088],{icon: century21icon}).addTo(map);

提交回复
热议问题