I have two polylines on the map:
- Polyline 1 as
route
- Polyline 2 as
other
I want to clear only one. How can I do that?
I have tried with:
$('#map_canvas').gmap('clear', 'overlays > Polyline').route
But it does not work.
$('#map_canvas').gmap('addShape',
'Polyline', {
tags:'other',
property: 'tags',
path: other_positions,
strokeColor: '#ff0000',
strokeOpacity: 1.0,
strokeWeight: 2
});
$('#map_canvas').gmap('addShape',
'Polyline', {
tags:'route',
property: 'tags',
path: array_positions,
strokeColor: '#0000ff',
strokeOpacity: 1.0,
strokeWeight: 2
});
When clicking a button, I want only this polyline (route) to be cleared while it clears both