Hello, I want to make a toggle for polygons with checkboxes, but I can't see how to make a simple hide/show button:
I have for example: http://pastebin.com/m70981c1a http://boxes.x10hosting.com/poly-2.9.html why can't this work (m7418 is the polygon): var toggleState = 1; function toggle() { if (toggleState == 1) { m7418.setMap(null); toggleState = 0; } else { m7418.setMap(map); toggleState = 1; } } I've seen these examples for v2: http://mapperz.googlepages.com/poly_kml_updated.html, http://www.nn4d.com/site/global/build/manuals/doku6058.jsp?id=ajax:2.0:tutorials:map_objects:polygon; and this one for v3: http://home.provide.net/~bratliff/polycluster/v3/polygon.html; I came here by way of this page : http://groups.google.com/group/google-maps-js-api-v3/browse_thread/thread/de419c64c313bab8 and thought this might work. Thanks for any help. -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.
