On Feb 14, 4:39 pm, geomapper <[email protected]> wrote: > I have a marker named "marker" on my map and I want to create a toggle > switch to remove the marker.. using the API I thought this would work: > > function toggleMyKml() { > if (toggleState == 1) { > map.hide(marker); > toggleState = 0; > } else { > map.show(marker); > toggleState = 1; > } > } > > .. > > .. > > .. > > <input type="button" value="Toggle Markers" onClick="toggleMyKml();"/> > > but it doesn't map.hide() and map.show() don't exist > > how does one toggle hide/show a marker on their google map? thanks
Maybe you should call hide() on the marker rather than the map: http://code.google.com/apis/maps/documentation/reference.html#GMarker.hide -- Larry --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API" 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-API?hl=en -~----------~----~----~----~------~----~------~--~---
