在Google地球中,我的气球打开时没有指向我线上的正确位置。他们正在等待。我读了一些地方,可以通过在多几何地标上添加一个点来修复这个问题,它会指向那个地方。但它不起作用!有没有解决这个问题?我正在使用mac和Google Earth 7.1
谢谢, 艾伦
<?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>KmlFile</name>
<Schema name="Gorge_Trails" id="Trails_Schema_id">
<SimpleField type="string" name="Trail_number"><displayName><b>Trail_number</b></displayName>
</SimpleField>
<SimpleField type="string" name="Trail_name"><displayName><b>Trail_name</b></displayName>
</SimpleField>
<SimpleField type="string" name="Location"><displayName><b>Location</b></displayName>
</SimpleField>
<SimpleField type="string" name="Difficulty"><displayName><b>Difficulty</b></displayName>
</SimpleField>
<SimpleField type="string" name="Picture_URL"><displayName><b>Picture_URL</b></displayName>
</SimpleField>
<SimpleField type="string" name="Link1"><displayName><b>Link1</b></displayName>
</SimpleField>
<SimpleField type="string" name="Link2"><displayName><b>Link2</b></displayName>
</SimpleField>
<SimpleField type="string" name="Photo_credit"><displayName><b>Photo_credit</b></displayName>
</SimpleField>
<SimpleField type="double" name="Hike_Dist"><displayName><b>Hike_Dist</b></displayName>
</SimpleField>
<SimpleField type="string" name="Trailhead"><displayName><b>Trailhead</b></displayName>
</SimpleField>
<SimpleField type="string" name="Type"><displayName><b>Type</b></displayName>
</SimpleField>
<SimpleField type="double" name="TR_Length"><displayName><b>TR_Length</b></displayName>
</SimpleField>
<SimpleField type="string" name="Hike_Name"><displayName><b>Hike_Name</b></displayName>
</SimpleField>
<SimpleField type="string" name="State"><displayName><b>State</b></displayName>
</SimpleField>
<SimpleField type="string" name="Elevation1"><displayName><b>Elevation1</b></displayName>
</SimpleField>
<SimpleField type="string" name="Hike_Dis_1"><displayName><b>Hike_Dis_1</b></displayName>
</SimpleField>
</Schema>
<Style id="Hikes_highlight_traillink">
<IconStyle>
<color>0000ffff</color>
<scale>0.1</scale>
</IconStyle>
<BalloonStyle>
<text><![CDATA[<table border="0">
<table width="250" border="0" cellspacing="0" cellpadding="1" bgcolor="#e8e9cb" align="center">
<tr>
<td colspan="2" align="center">
<img src="http://gorgefriends.org/img/gorge_index_02.gif" alt="picture" width="100%" height="50"/>
</td>
</tr>
<tr>
<td colspan="2" align="center" valign="bottom" cellpadding="1">
<font color='#3a493e'size=+2> <b>$[Gorge_Trails/Hike_Name]</b></font>
<tr>
<td colspan="2" align="center" valign="bottom" cellpadding="1">
<font color='#3a493e' size=+1 <b>$[Gorge_Trails/Location], $[Gorge_Trails/State]</b></font>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<img src=$[Gorge_Trails/Picture_URL] alt="picture" width="100%" height="140"/>
</td>
<tr>
<td colspan="2" align="center">
<font color="#999999" size="1">Photo:$[Gorge_Trails/Photo_credit]</font>
</td>
</tr>
<table width="250" border="0" cellspacing="3" cellpadding="0" bgcolor="#e8e9cb" align="center">
<tr><td><b>Trailhead</b></td><td>$[Gorge_Trails/Trailhead]</td></tr>
<tr><td><b>Hike Distance</b></td><td>$[Gorge_Trails/Hike_Dist] miles</td></tr>
<tr><td><b>Difficu
lty</b></td><td>$[Gorge_Trails/Difficulty]</td></tr>
<tr><td><b>Type</b></td><td>$[Gorge_Trails/Type]</td></tr>
<tr><td><b>Trail Name</b></td><td>$[Gorge_Trails/Trail_name]</td></tr>
<table width="250" border="0" cellspacing="4" cellpadding="0" bgcolor="#e8e9cb" align="center">
<tr><td><a href="$[Gorge_Trails/Link2]"><font color=#993300>Rails-to-Trails</font color></a>
</td></tr>
<table width="250" border="0" cellspacing="1" cellpadding="0" bgcolor="#e8e9cb" align="center"> <tr>
<td colspan="2" align="center" valign="bottom">
<font color="#999999" size="1">Copyright: Friends of the Columbia Gorge/Portlandhikers.org is a proud partner of the</font><a href= http://gorgefriends.org/section.php?id=81><font color="#993300" size="1"> Gorge Towns to Trails Initiative</font></a>
</td>
</tr>
</table>]]></text>
<bgColor>ff689a9a</bgColor>
</BalloonStyle>
<ListStyle>
<maxSnippetLines>0</maxSnippetLines>
</ListStyle>
<LineStyle>
<color>ff1eede9</color>
<width>4</width>
</LineStyle>
</Style>
<Style id="Hikes_normal_traillink">
<IconStyle>
<color>0000ffff</color>
<scale>0.1</scale>
</IconStyle>
<LabelStyle>
<scale>0</scale>
</LabelStyle>
<BalloonStyle>
<text><![CDATA[<table border="0">
<table width="250" border="0" cellspacing="0" cellpadding="1" bgcolor="#e8e9cb" align="center">
<tr>
<td colspan="2" align="center">
<img src="http://gorgefriends.org/img/gorge_index_02.gif" alt="picture" width="100%" height="50"/>
</td>
</tr>
<tr>
<td colspan="2" align="center" valign="bottom" cellpadding="1">
<font color='#3a493e'size=+2> <b>$[Gorge_Trails/Hike_Name]</b></font>
<tr>
<td colspan="2" align="center" valign="bottom" cellpadding="1">
<font color='#3a493e' size=+1 <b>$[Gorge_Trails/Location], $[Gorge_Trails/State]</b></font>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<img src=$[Gorge_Trails/Picture_URL] alt="picture" width="100%" height="140"/>
</td>
<tr>
<td colspan="2" align="center">
<font color="#999999" size="1">Photo:$[Gorge_Trails/Photo_credit]</font>
</td>
</tr>
<table width="250" border="0" cellspacing="3" cellpadding="0" bgcolor="#e8e9cb" align="center">
<tr><td><b>Trailhead</b></td><td>$[Gorge_Trails/Trailhead]</td></tr>
<tr><td><b>Hike Distance</b></td><td>$[Gorge_Trails/Hike_Dist] miles</td></tr>
<tr><td><b>Difficulty</b></td><td>$[Gorge_Trails/Difficulty]</td></tr>
<tr><td><b>Type</b></td><td>$[Gorge_Trails/Type]</td></tr>
<tr><td><b>Trail Name</b></td><td>$[Gorge_Trails/Trail_name]</td></tr>
<table width="250" border="0" cellspacing="4" cellpadding="0" bgcolor="#e8e9cb" align="center">
<tr><td><a href="$[Gorge_Trails/Link2]"><font color=#993300>Rails-to-Trails</font color></a>
</td></tr>
<table width="250" border="0" cellspacing="1" cellpadding="0" bgcolor="#e8e9cb" align="center"> <tr>
<td colspan="2" align="center" valign="bottom">
<font color="#999999" size="1">Copyright: Friends of the Columbia Gorge/Portlandhikers.org is a proud partner of the</font><a href= http://gorgefriends.org/section.php?id=81><font color="#993300" size="1"> Gorge Towns to Trails Initiative</font></a>
</td>
</tr>
</table>]]></text>
<bgColor>ff689a9a</bgColor>
</BalloonStyle>
<ListStyle>
<maxSnippetLines>0</maxSnippetLines>
</ListStyle>
<LineStyle>
<color>ff000080</color>
<width>2</width>
</LineStyle>
</Style>
<StyleMap id="Hikes_style_traillink">
<Pair>
<key>normal</key>
<styleUrl>#Hikes_normal_traillink</styleUrl>
</Pair>
<Pair>
<key>highlight</key>
<styleUrl>#Hikes_highlight_traillink</styleUrl>
</Pair>
</StyleMap>
<Placemark>
<name>The Dalles Trail</name>
<LookAt>
<longitude>-121.1675204504952</longitude>
<latitude>45.63510133211322</latitude>
<altitude>0</altitude>
<heading>-1.634887800693966e-09</heading>
<tilt>45.00165866539888</tilt>
<range>11801.15617415238</range>
<gx:altitudeMode>relativeToSeaFloor</gx:altitudeMode>
</LookAt>
<styleUrl>#Hikes_style_traillink</styleUrl>
<ExtendedData>
<SchemaData schemaUrl="#Trails_Schema_id">
<SimpleData name="Trail_number">4406</SimpleData>
<SimpleData name="Trail_name">The Dalles Trail</SimpleData>
<SimpleData name="Location">Eastern Gorge</SimpleData>
<SimpleData name="Difficulty">Easy</SimpleData>
<SimpleData name="Picture_URL">http://blog.oregonlive.com/terryrichard/2009/05/large_TR.TheDallesTrail.jpg</SimpleData>
<SimpleData name="Link1">http://gorgefriends.org/display.php?modin=51&uid=4921</SimpleData>
<SimpleData name="Link2">http://www.traillink.com/trail/the-dalles-riverfront-trail.aspx#tabPhotoGallery</SimpleData>
<SimpleData name="Photo_credit">Terry Richard/The Oregonian</SimpleData>
<SimpleData name="Hike_Dist">11.2</SimpleData>
<SimpleData name="Trailhead">The Dalles Trailhead</SimpleData>
<SimpleData name="Type">Out and Back</SimpleData>
<SimpleData name="TR_Length">0</SimpleData>
<SimpleData name="Hike_Name">The Dalles Rail Trail</SimpleData>
<SimpleData name="State">Oregon</SimpleData>
<SimpleData name="Elevation1">200 ft.</SimpleData>
<SimpleData name="Hike_Dis_1">miles</SimpleData>
<SimpleData name="POINT_X">-121.197</SimpleData>
<SimpleData name="POINT_Y">45.6276</SimpleData>
</SchemaData>
</ExtendedData>
<gx:balloonVisibility>1</gx:balloonVisibility>
<MultiGeometry>
<LineString>
<tessellate>1</tessellate>
<coordinates>
-121.2191227996079,45.65623491828678,0 -121.2078460984247,45.641231128264,0 -121.2081174642494,45.62199596450162,0 -121.2013742163807,45.61232779014134,0 -121.1763471207253,45.60147362786477,0 -121.1389784963313,45.6012101599156,0 -121.1150449368218,45.61651025155123,0 -121.1141521992769,45.62130724242957,0
</coordinates>
</LineString>
<Point>
<coordinates>-121.197032272514,45.62764529609835,0</coordinates>
</Point>
</MultiGeometry>
</Placemark>
</Document>
</kml>
答案 0 :(得分:0)
将气球放置在地图上的锚点计算为要素中几何的中心点。对于您的示例中的MultiGeometry,它是线的中心和点的组合。线条的范围使中心偏向右边。
如果您希望气球锚定在该点,则将 LineString 移动到第二个功能。
您可以通过向根级别文档添加{em> checkHideChildren 类型ListStyle来隐藏您有两个功能而不是一个功能,以隐藏这些子功能:
<Document>
<name>KmlFile</name>
<styleUrl>#checkHide</styleUrl>
<Style id="checkHide">
<ListStyle>
<listItemType>checkHideChildren</listItemType>
</ListStyle>
</Style>
...
<Placemark>
<name>The Dalles Trail</name>
<!-- LookAt, ExtendedData, etc. -->
<Point>...</Point>
</Placemark>
<Placemark>
<LineString>...</LineString>
</Placemark>
</Document>