KML气球不会自动打开

时间:2014-12-30 16:40:27

标签: kml google-earth

根据我的阅读,自动打开地标气球(无需点击),您只需将<open>1</open>放在<placemark>标记下。

我还看到<open>标记位于<document>标记下的其他位置,但无论我放在哪里,气球都不会自行打开。

这是我正在使用的文件(我将<open>标记放在三个不同的地方,希望它可以正常工作):

<?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" xmlns:location="http://blah.com">
<Document>
    <name>RSSToKml</name>
    <open>1</open>
    <StyleMap id="m_ylw-pushpin">
        <Pair>
            <key>normal</key>
            <styleUrl>#s_ylw-pushpin</styleUrl>
        </Pair>
        <Pair>
            <key>highlight</key>
            <styleUrl>#s_ylw-pushpin_hl0</styleUrl>
        </Pair>
    </StyleMap>
    <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>
    <Style id="s_ylw-pushpin_hl0">
        <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>

    <Placemark>
        <name>A name</name>
        <open>1</open>
        <description>A description</description>

        <LookAt>
            <longitude>-73.99736287597681</longitude>
            <latitude>40.71745136763278</latitude>
            <altitude>0</altitude>
            <heading>-46.51707308500568</heading>
            <tilt>5.83698745180558</tilt>
            <range>7808.551256710743</range>
            <gx:altitudeMode>relativeToSeaFloor</gx:altitudeMode>
        </LookAt>

        <styleUrl>#m_ylw-pushpin</styleUrl>
        <Point>
            <gx:drawOrder>1</gx:drawOrder>
            <coordinates>-73.9994479424963,40.71617147826365,0</coordinates>
        </Point>
    </Placemark>

  </Document>
</kml>

1 个答案:

答案 0 :(得分: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">

<Placemark>
<name>automatically balloon </name>
<description>
    Located in Paris, France. 

    This description balloon opens 
    when the Placemark is loaded.
</description>
<gx:balloonVisibility>1</gx:balloonVisibility>
<Point> 
  <coordinates>57.0833,30.2833,0</coordinates>
</Point>
</Placemark>

</kml>