2011-03-30 55 views
6

我是kml的新手,沒有找到在多個地標之間創建路徑的方法(每個地圖都帶有一些座標,名稱,說明)。我檢查了kml tutos,但沒有找到。如何在地標之間繪製路徑

任何想法?

+1

我不知道任何其他方式創建LineString元素,如下面的示例http://code.google.com/intl/sv-SE/apis/maps/documentation/javascript/examples/layer- kml.html。這是你在找什麼? – 2011-04-03 09:05:30

+0

@bjorn謝謝,我會進入這個方向。 – Luc 2011-04-26 15:25:16

回答

9

創建一個與您的點具有相同座標(經度,緯度,高度)的LineString元素。

<Folder> 
    <description>Frankie likes walking and stopping</description> 
    <Placemark id="track1"> 
     <name>frankies path</name> 
     <LineString> 
      <coordinates>-46.67,-23.58,100 -46.754,-23.666,100 -46.6616,-23.5632,100 </coordinates> 
     </LineString> 
    </Placemark> 

    <Placemark> 
     <name> 2012-05-31 17:23:09</name> 
     <description> Stop TIME: 19:25:20 Source: network</description> 
     <Point> 
      <coordinates>-46.67,-23.58,100 </coordinates> 
     </Point> 
    </Placemark> 
    <Placemark> 
     <name> 2012-05-31 17:23:09</name> 
     <description> Stop TIME: 03:01:59 Source: gps</description> 
     <Point> 
      <coordinates>-46.754,-23.666,100 </coordinates> 
     </Point> 
    </Placemark> 
    <Placemark> 
     <name> 2012-05-31 17:23:09</name> 
     <description> Stop TIME: 02:26:13 Source: network</description> 
     <Point> 
      <coordinates>-46.6616,-23.5632,100 </coordinates> 
     </Point> 
    </Placemark> 
</Folder> 
相關問題