2012-05-14 38 views
0

在谷歌地球有一個很好的功能,我可以安裝一個kml文件,並以這種方式加載它,以便我切換不同的圖層。在谷歌地圖中,​​我正在尋找一種以類似方式顯示kml文件的方法。我想有一個側欄,可以選擇要顯示的圖層。我發現這一點:在谷歌地圖v3中正確顯示kml?

http://www.dyasdesigns.com/geoxml/

但它看起來像只用谷歌地圖V2工作。有沒有類似的功能可以與v3一起使用?

我發現這個QA,但我正在尋找的東西與V3

編輯更多信息使用方法: 我的身體:

<body onload='load()' style = "height:100%; margin:0"> 
<div id="map" style="width: 100%; height: 100%"></div> 

<script type="text/javascript"> 
//************Function in head*************************************************** 
     function load() { 

     var myOptions = { 

     //change this to zoom with markers 
      center: new google.maps.LatLng(60, 5), 
      zoom: 4, 
      mapTypeId: google.maps.MapTypeId.ROADMAP 
     }; 

     map = new google.maps.Map(document.getElementById("map"),myOptions); 
     ctaLayer = new google.maps.KmlLayer('http://thoughtfi.com/NPDsFactGlobe.kml'); 
     ctaLayer.setMap(map); 
     } 
    //load(); 

    var map; 
    var ctaLayer; 
    var markersArray = []; 
    var startformat; 
    var endformat; 

</script> 
</body> 

的鏈接網站(可能上下如果我正在處理它。):http://thoughtfi.com/KMLtries.html

谷歌地球的圖片。我想在左側欄中的文件夾的功能:http://thoughtfi.com/desired_look.png

回答