remove polyline from google map between two points
I have two arrays of locations. and i want to display two different polylines on single map.
but when i tried for that there is one polyline between last location of first array to first location of second array.
So, i get two different polylines connected by one unwanted polyline.
so i want to remove that polyline.
help me.
if(index==0) // first location of second array
{
开发者_高级运维 if(testarray != null){
alert('hityhd');
alert(testarray);
testarray.push(newLatlng);
if( testarray[0].line ) {
map.removeOverlay( testarray[0].line );
testarray[0].line = null;
}
}
}
精彩评论