我之前从未尝试过编辑kml文件,所以我不完全确定我要问的是什么,但我会尽我所能。
我正在尝试为我的placemarkkers使用自定义图标。我试图将图像上传到托管网站并链接到它们,我也尝试将它们放入子文件夹并引用本地地址。以下是这些尝试。
<Style id="1">
<IconStyle>
<Icon>
<href>https://cdn1.imggmi.com/uploads/2019/3/8/63626b5bc964d76ca0d5bdb30fb44afd-full.png</href>
</Icon>
</IconStyle>
</Style>
第二种方法:
<Style id="1">
<IconStyle>
<Icon>
<href>files/number_1.png</href>
</Icon>
</IconStyle>
</Style>
地标标记引用了这样的样式:
<Placemark>
<styleUrl>#1</styleUrl>
<Point>
<coordinates>-86.78824404543640,36.41901416833124,1005.84</coordinates>
<altitudeMode>absolute</altitudeMode>
</Point>
</Placemark>
无论我做什么,我都无法将图标显示在GE中。我已经阅读了一些不同的教程,尝试以不同的方式命名文件夹和子文件夹,并尝试使用主文件夹中的kml和子文件夹中的图标创建kmz。似乎没什么用。感觉就像我遗漏了一些基本的或根本上误解了这方面的一些方面,但对于我的生活,我似乎无法弄明白!
任何帮助表示赞赏!
此KML适用于Google地球中的KMZ / zip文件:
<?xml version="1.0" encoding="utf-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<Style id="1">
<IconStyle>
<Icon>
<href>files/number_1.png</href>
</Icon>
</IconStyle>
</Style>
<Placemark>
<styleUrl>#1</styleUrl>
<Point>
<coordinates>-86.78824404543640,36.41901416833124,1005.84</coordinates>
<altitudeMode>absolute</altitudeMode>
</Point>
</Placemark>
</Document>
</kml>
我只是为此努力...没关系。这让人很难堪。
同样的问题:带有嵌入式图标的kmz在GE桌面上工作,但图标不会导入到Google我的地图中。我很沮丧,我准备好伤害别人。
当然这完全是我的错。
<href>Images/Icon-1.png</href>
在GE桌面上工作,但不在地图上工作。
<href>images/icon-1.png</href>
曾在两家公司工作过。
问题:Web的所有内容都区分大小写,因此文件夹名称“Images”在Web上不起作用,因为zip文件中的文件夹名为“images”(小写字母')
D'哦!