I am successfully making and drawing poly lines on a marker click event. But there is a thing happening which I do not want to be happen.
And that is when I click on marker Let say JackiMarker it draws route to the target location but then I click to second marker let say MichaelMarker it also draws the route but the previous marker is still there which I do not want to be.
I am sing this code to draw and remove the marker. It has the clearRoute function but it is not working for me , please help me what to do . Please help me in removing the last polyline I have drawn on map.