既然你問了指導方針,一個例子KML文件看起來是這樣的:
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<Placemark>
<name>New York City</name>
<description>New York City</description>
<Point>
<coordinates>-74.006393,40.714172,0</coordinates>
</Point>
</Placemark>
</Document>
</kml>
看來你可以保持<name>
場一樣,你可以將xml字段<city,<state>,<country>
中的項目合併到klm字段<address>city,state,country</address>
或將其作爲kml <description>
標記(用戶提供的內容出現在描述氣球中),因爲kml將使用long和lat來確定提供的點,而不是使用一個地址。轉換XML <longitute>,<latitudite>
需要變成一個KML <point><cordinates>longitute,latatude</cordinates></point>
所以,你需要你的荷航文檔轉換爲這樣的事情:
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<Placemark>
<name>Sharon Appartments</name>
<description>Dallas, California, USA</description>
<Point>
<coordinates>115.23412,34.734121</coordinates>
</Point>
</Placemark>
<Placement>
Put item 2 details here
</Placement>
.
.
.
<Placement>
Put item 20000 details here
</Placement>
</Document>
</kml>
我得到這個從https://developers.google.com/kml/documentation/kmlreference,
現在的熱圖部分,如果你可以將你的文件轉換成經緯度列表,你可以把它放到這個網頁上的python程序:http://jjguy.com/heatmap/,它會根據這些數據爲谷歌地圖產生一個kml覆蓋圖,你需要合併與你的城市的kml文件覆蓋d ata來獲得完整的地圖。
任何轉換器將其轉換? – smily 2012-08-01 13:22:56