学习leaflet笔记(四)显示动态轨迹
定义图标
var carIcon = L.icon({
iconUrl:'img/car.png',
iconSize:[25.1,25],
});
显示汽车动态轨迹
L.motion.polyline([
[30.65, 104.05],
[30.65, 104.10],
[30.65, 104.15],
[30.70, 104.15],
[30.75, 104.15],
],{
color:'red'
},{
auto:true,
duration:5000,
easing:L.Motion.Ease.easeInOutQuart
},{
removeOnEnd:false,
icon:carIcon
}).addTo(map);