2010-02-12 155 views
1

測試我將這個html文件保存到我的服務器。有沒有簡單的方法在這裏包含KML或KMZ文件?在谷歌地圖上使用KML/KMZ

<!DOCTYPE html "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> 
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/> 
    <title>Google Maps JavaScript API Example</title> 
    <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABCDEFghijetc&sensor=false" 
      type="text/javascript"></script> 
    <script type="text/javascript"> 

    function initialize() { 
     if (GBrowserIsCompatible()) { 
     var map = new GMap2(document.getElementById("map_canvas")); 
     map.setCenter(new GLatLng(59.082089,5.649456), 18, G_SATELLITE_MAP); 
     map.setUIToDefault(); 
     } 
    } 

    </script> </head> <body onload="initialize()" onunload="GUnload()"> 
    <div id="map_canvas" style="width: 800px; height: 600px"></div> </body> </html> 

回答