Hi, does anyone know if it is possible to remove the overlay where I previously drew a polygon? I don't want to use clearOverlays because it will remove all the markers also, instead I want to just hide the markers. Thanks, Richard
A:
Take a look at the GoogleMaps References:
There you can find the function hide()
which should do the job.
mropa
2010-02-16 07:06:57
+1
A:
Yes. Did you keep a reference to the overlay in question? Then just call map.removeOverlay()
http://code.google.com/apis/maps/documentation/reference.html#GMap2
You question could be less conflicted. If you want to hide an overlay, say a marker, do as other poster said, hide() it.
polys are overlays, they are not married to markers, which are overlays as well.
Sky Sanders
2010-02-16 08:20:54
I think I know what you mean, and I will try it out when I am home and not typing into my phone.
Richard
2010-02-16 09:16:22
A:
Have you tried the removeOverlay method of the GMap object?
removeOverlay(overlay:GOverlay)
You can also just hide a marker without removing it from the map.
Stephen Curran
2010-02-16 08:42:13