我想了解KML地面疊加層教程,它具有以下代碼爲例:如何創建一個kml地圖覆蓋?
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Folder>
<name>Ground Overlays</name>
<description>Examples of ground overlays</description>
<GroundOverlay>
<name>Large-scale overlay on terrain</name>
<description>Overlay shows Mount Etna erupting
on July 13th, 2001.</description>
<Icon>
<href>https://developers.google.com/kml/documentation/images/etna.jpg</href>
</Icon>
<LatLonBox>
<north>37.91904192681665</north>
<south>37.46543388598137</south>
<east>15.35832653742206</east>
<west>14.60128369746704</west>
<rotation>-0.1556640799496235</rotation>
</LatLonBox>
</GroundOverlay>
</Folder>
</kml>
沒有API密鑰數量,所以我想這個KML旨在與地圖相結合某種。
我救了KML到公共accessable文件: https://drive.google.com/file/d/0Bx17tEcqrzavTlc4ZHVmNFgyM1k/view?usp=sharing
當然我必須做出一個嵌入式地圖具有一定的參考這個KML文件。
https://developers.google.com/maps/documentation/embed/guide 這裏的第一個例子使用iframe,它使用地方模式,我不想。
<iframe
width="600"
height="450"
frameborder="0" style="border:0"
src="https://www.google.com/maps/embed/v1/place?key=YOUR_API_KEY
&q=Space+Needle,Seattle+WA" allowfullscreen>
</iframe>
查看模式似乎最適合上述鏈接選項。
https://www.google.com/maps/embed/v1/view
?key=YOUR_API_KEY
¢er=-33.8569,151.2152
&zoom=18
&maptype=satellite
Oviously這需要重新定到埃特納火山,和我的API密鑰:
ttps://www.google.com/maps/embed/v1/view
?key=AIzaSyCrzeJMzJcHGCZj26Y9tHhmkSQ1zzJi8o0
¢er=37.91904192681665,15.35832653742206
&zoom=14
&maptype=satellite
是否需要被放置在IFRAME?
如何結合這兩個代碼塊來創建嵌入我網站的kml地圖疊加層?
有沒有辦法做到這一點,而不使用Java?
https://developers.google.com/maps/documentation/javascript/kml –
http://googlemapsapi.blogspot.com/2007/03/kml-and-georss-support-added-to-google.html –