我正在制作Google地球KML,但遇到了麻烦。我的LineString
不会留在地上。我认为我在instructed中使用clampToGround
作为documentation。
为什么clampToGround
不让LineString
高于地面?如果我正确阅读文档,它确实应该保持在地面上。我试图通过relativeToGround
并给它一点高度来解决它,但这也没有用。我只是想确保线在整个地面上都是可见的。
KML的显着部分:
<Placemark>
<name>Untitled Path</name>
<styleUrl>#m_ylw-pushpin</styleUrl>
<LineString>
<extrude>1</extrude>
<tessellate>1</tessellate>
<altitudeMode>clampToGround</altitudeMode>
<coordinates>
86.66797376467392,48.79933074280933,100 87.52400441880934,49.14303840409646,100
</coordinates>
</LineString>
</Placemark>
<Placemark>
<name>Untitled Path2</name>
<styleUrl>#m_ylw-pushpin</styleUrl>
<LineString>
<extrude>1</extrude>
<tessellate>1</tessellate>
<altitudeMode>clampToGround</altitudeMode>
<coordinates>
86.66797376467392,48.81933074280933,10 87.52400441880934,49.15303840409646,10
</coordinates>
</LineString>
</Placemark>
<Placemark>
<name>Untitled Path3</name>
<styleUrl>#m_ylw-pushpin</styleUrl>
<LineString>
<extrude>1</extrude>
<tessellate>1</tessellate>
<altitudeMode>relativeToGround</altitudeMode>
<coordinates>
86.66797376467392,48.91933074280933,10 87.52400441880934,49.25303840409646,10
</coordinates>
</LineString>
</Placemark>
这是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>aaaa.kml</name>
<Style id="s_ylw-pushpin_hl">
<IconStyle>
<scale>1.3</scale>
<Icon>
<href>http://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png</href>
</Icon>
<hotSpot x="20" y="2" xunits="pixels" yunits="pixels"/>
</IconStyle>
</Style>
<Style id="s_ylw-pushpin">
<IconStyle>
<scale>1.1</scale>
<Icon>
<href>http://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png</href>
</Icon>
<hotSpot x="20" y="2" xunits="pixels" yunits="pixels"/>
</IconStyle>
</Style>
<StyleMap id="m_ylw-pushpin">
<Pair>
<key>normal</key>
<styleUrl>#s_ylw-pushpin</styleUrl>
</Pair>
<Pair>
<key>highlight</key>
<styleUrl>#s_ylw-pushpin_hl</styleUrl>
</Pair>
</StyleMap>
<Placemark>
<name>Untitled Path</name>
<styleUrl>#m_ylw-pushpin</styleUrl>
<LineString>
<tessellate>1</tessellate>
<coordinates>
-110.8533929259622,43.78725268338503,0 -110.8487894073726,43.78768726798314,0
</coordinates>
</LineString>
</Placemark>
</Document>
</kml>