Can anyone suggest me how to make moving polyline its urgent task for me plz help me out.
As of now I m doing in this way but failling to get the desired result as when I am adding setTimeBound or SetInterval its not working:
var newPolylineCords =
[
[23.1, -75.1],
[23.4, -75.7],
[38.6, -85.3],
[40.1, -82.9]
];
var homeIcon1 L.icon({
iconUrl: 'home1.png',
iconSize: [20, 20], // size of the icon
popupAnchor: [0,-15]
});
L.marker(newPolylineCords[j],{icon: homeIcon1,draggable: true}).addTo(map)
.openPopup();
var polylineOptionsValue = {
color: 'red',
weight: 1,
opacity: 1
};
var polyline = new L.polyline(newPolylineCords, polylineOptionsValue);
map.addLayer(polyline);
map.fitBounds(polyline.getBounds());
}
}