You need to check for the value of the checkbox. Here is the code that
I use
function LoadKML(chkbox) {
if(chkbox.checked == true) {
KML = new GGeoXml("http://www.mySite/myKML.kml");
map.addOverlay(KML);
}
if(chkbox.checked == false) {
map.removeOverlay(KML);
}
}
On Jan 12, 12:08 pm, Peter <[email protected]> wrote:
> Hopefully this is a simple fix. I have two points in need for help. I
> have two check boxes. I know I need to set up a function so that they
> will appear when clicked and unclicked. I have no idea what that would
> look like. Second I would love to be able to add a button for check
> all and clear all. Any help would be greatly appreciated. Thank you.
>
> Campus<input type="checkbox" value="box1" onclick="map.addOverlay
> (kml)"/>
> Dwinelle<input type="checkbox" value="box2" onclick="map.addOverlay
> (kml2)" />
>
> http://proaccessconsultants.com/testmap/map.html
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---