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
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.