So the button looks like this. I can't get the KML to load. Where have
I gone wrong?
Load KML<input type="checkbox" value="hide" name="campus" />

<script type="text/javascript">
    function LoadKML(campus) {
        if(campus.checked == true) {
                KML = new GGeoXml("http://proaccessconsultants.com/
testmap/dwinelle.kml");
                map.addOverlay(KML);
        }
        if(campus.checked == false) {
                map.removeOverlay(KML);
        }
    }
        </script>

Here is the map againhttp://proaccessconsultants.com/testmap/map.html

On Jan 12, 3:55 pm, Grok Lobster <[email protected]> wrote:
> 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to