// 动态marker animatedMarker = L.animatedMarker(routeLine.getLatLngs(), { interval: 100, // 默认为100mm icon: carIcon, playCall: updateRealLine, onEnd: function (e) { console.log(e, "onEnd回调"); }, }).addTo(this.map);
你好,你这是Leaflet.AnimatedMarker插件,请去官网 https://github.com/openplans/leaflet.animatedmarker,查看用法。