Removing a Google maps Circle/shape
You need to call the setMap method on the Circle object to null:
cityCircle.setMap(null);
To remove a circle from the map, call the setMap()
method passing null
as the argument.
circle.setMap(null);
Note that the above method does not delete the circle. It simply removes the circle from the map. If instead you wish to delete the circle, you should remove it from the map, and then set the circle itself to null
.
https://developers.google.com/maps/documentation/javascript/shapes#circle_remove