Toggle KML Layers in Google Maps v3

前端 未结 2 2137
盖世英雄少女心
盖世英雄少女心 2020-12-29 16:36

Is there a simple way to set up checkboxes to toggle (on/off) KML layers for Google Maps v3? I\'ve come across these articles, but none of them have worked for me.

2条回答
  •  春和景丽
    2020-12-29 17:00

    Sorry my article didn't work for you, it is a little dated.

    Here is a full example of a typical Gmaps toggle assuming you are using kml files.

    
    
    
     
    
    
    
    
    
    
    
    

    This is pure js so of course using jQuery you can do things a little easier. Hope this helps!

提交回复
热议问题