【发布时间】:2012-11-04 13:31:40
【问题描述】:
我正在玩 KML。 我正在创建一个在单击时显示图像的地标。当我右键单击图像时,有一个打开它的选项,但 Google 地球无法打开图像。有没有办法让谷歌地球打开它? KML 使用图像的相对路径,并且以这种方式在气球中显示图像没有问题,但是当我单击“打开图像”选项时,它无法打开。 如果有人有任何帮助,我将不胜感激。 谢谢!
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
<Document>
<name>Photos.kml</name>
<Folder>
<name>Photos</name>
<Style id="Photo">
<IconStyle>
<Icon>
<href>http://www.google.com/mapfiles/arrow.png</href>
</Icon>
<scale>.7</scale>
</IconStyle>
</Style>
<Placemark>
<name>IMG_0988.JPG</name>
<description><![CDATA[<div align="center"><table width="500"><tr><td colspan="2"><center><img src="pics/IMG_0988.jpg" width="500" height="373"></td></tr></table></div>]]></description>
<styleUrl>#Photo</styleUrl>
<Point>
<coordinates>13.18733333,60.66783333000001,0</coordinates>
</Point>
<Style>
<IconStyle>
<heading>90</heading>
</IconStyle>
</Style>
</Placemark>
</Folder>
</Document>
</kml>
【问题讨论】:
-
您是否尝试过制作 KMZ 文件并将图像作为 KMZ 文件的一部分添加到适当的子文件夹中?此外,对 google earth 而言并不重要,但您的 HTML 中有一个
开始标签,没有结束标签。 -
谢谢!一定错过了。
标签: kml google-earth