2013-08-30 35 views
1

我有這個KML文件:在Google地圖上製作GroundOverlay彈出工具提示?

<?xml version="1.0" encoding="utf-8"?> 
<kml xmlns="http://earth.google.com/kml/2.0"> 
<Document> 
<GroundOverlay> 
<Description>ABX_20130830_0009_N0R.gif</Description> 
<Icon> 
<href>http://data.bcinfo3.barrycarter.info/ABX_N0R.png</href> 
</Icon> 
<LatLonBox> 
<north>37.5650361494585</north> 
<south>32.7261689619585</south> 
<east>-104.179216974432</east> 
<west>-109.457981178977</west> 
</LatLonBox> 
</GroundOverlay> 
<Placemark><name>ABX_20130830_0009_N0R.gif</name><Point><coordinates> 
-106.818599076704,35.1456025557085 
</coordinates></Point></Placemark> 
</Document> 
</kml> 

在那裏 「http://data.bcinfo3.barrycarter.info/ABX_N0R.png」 有 透明背景。它在這裏顯示:

http://test.bcinfo3.barrycarter.info/bc-image-overlay.pl?center=35.1,-106.54&zoom=13&maptypeid=HYBRID&url=ABX_N0R.kml&refresh=60

當我點擊我希望它彈出「ABX_20130830_0009_N0R.gif」就像我在上面標記有 ABX_N0R.png, 的不透明部分,但它不「T。

有沒有簡單的方法來實現這一點?

我知道我可以用另一種標(接近 中心我的看法),但我更願意有 「ABX_20130830_0009_N0R.gif」可在地圖上的任何地方。

回答

0

我以前做過類似的事情,但是我用自定義覆蓋類型完成了它並偵聽了單擊事件。由於我有上投這個答案,我認爲這是我遵循的過程:

Make custom overlay clickable (Google Maps API v3)

我想應該是隻使用標準氣囊彈出就像你問一個更簡單的方法,但我無法找到一個簡單的答案尋找你。我會注意到上述方法並不太難實施。