Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/python-2.7/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google maps api 3 KML中带有自定义图标的点突然不显示在KML层中(但线字符串显示)_Google Maps Api 3_Kml_Google Maps Markers - Fatal编程技术网

Google maps api 3 KML中带有自定义图标的点突然不显示在KML层中(但线字符串显示)

Google maps api 3 KML中带有自定义图标的点突然不显示在KML层中(但线字符串显示),google-maps-api-3,kml,google-maps-markers,Google Maps Api 3,Kml,Google Maps Markers,这段代码在不久前还工作得很好。KML和Javascript当然没有改变,所以我想我在KML中遇到了一些谷歌更新不喜欢的问题 我有一个GoogleMapsAPI实现,它只是将一个KML文件加载到地图上的KMLLayer中。现在,我将显示线串,但不显示点 以下是KML中的相关片段 <Style id="start"> <IconStyle> <scale>0.0</scale> &

这段代码在不久前还工作得很好。KML和Javascript当然没有改变,所以我想我在KML中遇到了一些谷歌更新不喜欢的问题

我有一个GoogleMapsAPI实现,它只是将一个KML文件加载到地图上的KMLLayer中。现在,我将显示线串,但不显示点

以下是KML中的相关片段

    <Style id="start">
        <IconStyle>
            <scale>0.0</scale>
            <heading>0.0</heading>
            <Icon>
                <href>http://d1b3rm3ifop01h.cloudfront.net/mapicons/start-race-2.png</href>
                <refreshInterval>0.0</refreshInterval>
                <viewRefreshTime>0.0</viewRefreshTime>
                <viewBoundScale>0.0</viewBoundScale>
            </Icon>
        </IconStyle>
    </Style>

    ...

    <Placemark>
        <name>Baden Powell Horseshoe Bay Trailhead</name>
        <description>Elevation: 54.9 m (180.2 ft)&lt;br /&gt;Very small carpark only accessible travelling north.&lt;br /&gt;&lt;a href=&quot;http://www.trailhunger.com/junction/820&quot;&gt;Junction Information&lt;/a&gt;</description>
        <styleUrl>#start</styleUrl>
        <Point>
            <coordinates>-123.2749314141,49.3669179082,54.93</coordinates>
        </Point>
    </Placemark>

0
0
http://d1b3rm3ifop01h.cloudfront.net/mapicons/start-race-2.png
0
0
0
...
巴登鲍威尔马蹄湾步道
海拔:54.9米(180.2英尺)br/非常小的停车场只能向北行驶。br/a href=”http://www.trailhunger.com/junction/820“路口信息/a
#开始
-123.2749314141,49.3669179082,54.93

问题在于scale元素被设置为0.0,Google最近更改了Google Maps KML解析器,以支持scale元素。将其设置为1.0会显示图标

0.0是我使用的
de.micromata.opengis.kml
库的默认值

下一个问题是图标出现在错误的位置。这是因为我需要指定热点元素


这个答案是由geocodezip@gmail.com在我提出的问题上。

如果您在答案中显示您的最终固定KML以供比较,这将对其他人有所帮助。