KML 编写 - 点显示在 Google 地球的左窗格中,但不在地图层上
KML Writing - Points are showing up in Left Pane of Google Earh, But not On On Map Layer
我有这个 kml 脚本,我正在使用它在 Google 地球中放置 "arrow" 图标。这个想法是当用光标经过时图标会突出显示。
knl 没有错误地加载到 GE 中,白色图标显示在左窗格(Places")中,但不是在实际地图上。任何地方都没有突出显示。我的光标现在在 GE 中是一只大手. 右击左栏图标属性时没有属性
我的代码哪里出错导致图标不可见且无法访问?
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<name>729A</name>
<description></description>
<Style id="highlightPlacemark">
<IconStyle>
<color>ff00aaff</color>
<scale>0.6</scale>
<Icon>
<href>http://maps.google.com/mapfiles/kml/shapes/arrow.png</href>
</Icon>
</IconStyle>
</Style>
<Style id="normalPlacemark">
<IconStyle>
<color>ff0000ff</color>
<scale>0.6</scale>
<Icon>
<href>http://maps.google.com/mapfiles/kml/shapes/arrow.png</href>
</Icon>
</IconStyle>
</Style>
<StyleMap id="arrows1StyleMap">
<Pair>
<key>normal</key>
<styleUrl>#normalPlacemark</styleUrl>
</Pair>
<Pair>
<key>highlight</key>
<styleUrl>#highlightPlacemark</styleUrl>
</Pair>
</StyleMap>
<Placemark>
<name></name>
<description></description>
<styleUrl>#arrows1StyleMap</styleUrl>
<point>
<coordinates>-80.54005,43.46324,0</coordinates>
</point>
</Placemark>
<Placemark>
<name></name>
<description></description>
<styleUrl>#arrows1StyleMap</styleUrl>
<point>
<coordinates>-80.54005,43.46324,0</coordinates>
</point>
</Placemark>
</Document>
</kml>
看来我在适当的大写方面犯了几个错误。
例如...
"Point" 的大写很关键。
如果您想检查 KML 中的基本错误,可以使用此 KML 验证器:
http://www.kmlvalidator.org
(该网站目前似乎已关闭,但通常运行良好)
它执行严格的模式验证,因此会发现重要错误,以及大多数 KML 客户端(包括 Google Earth)并不真正关心的许多挑剔的东西。
我有这个 kml 脚本,我正在使用它在 Google 地球中放置 "arrow" 图标。这个想法是当用光标经过时图标会突出显示。
knl 没有错误地加载到 GE 中,白色图标显示在左窗格(Places")中,但不是在实际地图上。任何地方都没有突出显示。我的光标现在在 GE 中是一只大手. 右击左栏图标属性时没有属性
我的代码哪里出错导致图标不可见且无法访问?
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<name>729A</name>
<description></description>
<Style id="highlightPlacemark">
<IconStyle>
<color>ff00aaff</color>
<scale>0.6</scale>
<Icon>
<href>http://maps.google.com/mapfiles/kml/shapes/arrow.png</href>
</Icon>
</IconStyle>
</Style>
<Style id="normalPlacemark">
<IconStyle>
<color>ff0000ff</color>
<scale>0.6</scale>
<Icon>
<href>http://maps.google.com/mapfiles/kml/shapes/arrow.png</href>
</Icon>
</IconStyle>
</Style>
<StyleMap id="arrows1StyleMap">
<Pair>
<key>normal</key>
<styleUrl>#normalPlacemark</styleUrl>
</Pair>
<Pair>
<key>highlight</key>
<styleUrl>#highlightPlacemark</styleUrl>
</Pair>
</StyleMap>
<Placemark>
<name></name>
<description></description>
<styleUrl>#arrows1StyleMap</styleUrl>
<point>
<coordinates>-80.54005,43.46324,0</coordinates>
</point>
</Placemark>
<Placemark>
<name></name>
<description></description>
<styleUrl>#arrows1StyleMap</styleUrl>
<point>
<coordinates>-80.54005,43.46324,0</coordinates>
</point>
</Placemark>
</Document>
</kml>
看来我在适当的大写方面犯了几个错误。
例如... "Point" 的大写很关键。
如果您想检查 KML 中的基本错误,可以使用此 KML 验证器: http://www.kmlvalidator.org (该网站目前似乎已关闭,但通常运行良好)
它执行严格的模式验证,因此会发现重要错误,以及大多数 KML 客户端(包括 Google Earth)并不真正关心的许多挑剔的东西。