Hello, I'm having truble with the remove of a kml overlay when a checkbox is used can some one help?
http://www.mu130.acres-air.co.uk/map2.html the code is this:- <script type="text/javascript"> var map; function initialize() { map = new GMap2(document.getElementById("map_canvas")); map.setCenter(new GLatLng(51.8951, -2.0699), 13); map.addControl(new GLargeMapControl()); map.addControl(new GMapTypeControl()); map.enableGoogleBar(); } function toggleKml(file) { var kmlCheckbox = document.getElementById(file); if (kmlCheckbox.checked){ var kml = new GGeoXml('http://www.mu130.acres-air.co.uk/Maps/' + file + '.kml'); map.addOverlay(kml); } else{ map.removeOverlay(); } } </script> html bit div map works fine <input type="checkbox" id="univeristy" onclick="toggleKml('univeristy');"/> it loads the overlay just can't get it to remove? also would I get more problems with more overlays and the memeroy location of the kml?? -- 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.
