【发布时间】:2012-05-31 05:13:34
【问题描述】:
这个问题最近才出现,但我找不到任何关于谷歌更改任何相关内容的参考。
我有一个网站,我想在点击时在地图上显示只是一个区域的名称,而不是以可怕的默认样式 <name> 始终显示在其中。
所以,在<BalloonStyle><text> 添加$[description],在<description> 添加CDATA $[name]
这在谷歌地图中运行良好,直到不久前,在我的谷歌地图中运行良好。
现在(当它们可点击时)我的多边形显示大名称,如果 <description> 中没有任何内容,则显示 $[name] 或 $[description]。
气球的一些内部(来自视图选择源):
<div jstcache="0" style="font-weight: bold; font-size: medium; margin-bottom: 0em;" torrens_rural_catchment=""> Torrens Rural Catchment </div> <div jstcache="0" id="iw_kml"><div jstcache="0">$[name]</div></div>
还有!我的一个多边形完全不可见,但可以点击! (在地球上完全可见)
我完全不知道为什么会发生这种情况。我想不出我对代码所做的任何事情来影响它。
网站:http://wds.amlr.waterdata.com.au/Amlr.aspx (点击绿色区域下方附近的不可见多边形。另外,网站未完成)
使用 Shabdar 的 Google Maps Control for ASP.NET
所有 kmz 小于 30 kb
请帮忙!
"<description> HTML 内容是允许的,但经过清理以防止跨浏览器攻击;不支持$[dataName] 形式的实体替换。"好的,很公平,我如何只显示名称(最好是小文本)?它总是坏掉!
公里详情: google earth 仅以小文本显示名称,maps 在其下方显示大名称和描述文本。
<?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>Fleurieu_Peninsula_Catchment.kml</name>
<StyleMap id="default1">
<Pair>
<key>normal</key>
<styleUrl>#default</styleUrl>
</Pair>
<Pair>
<key>highlight</key>
<styleUrl>#default0</styleUrl>
</Pair>
</StyleMap>
<Style id="default">
<IconStyle>
<scale>0.7</scale>
</IconStyle>
<LabelStyle>
<color>00ffffff</color>
</LabelStyle>
<BalloonStyle>
<text><![CDATA[$[name]]]></text>
</BalloonStyle>
<LineStyle>
<width>0.5</width>
<color>cc94c934</color>
</LineStyle>
<PolyStyle>
<color>7fffc24f</color>
<outline>0</outline>
</PolyStyle>
</Style>
<Style id="default0">
<IconStyle>
<scale>0.7</scale>
</IconStyle>
<LabelStyle>
<color>00ffffff</color>
</LabelStyle>
<BalloonStyle>
<text><![CDATA[$[name]]]></text>
</BalloonStyle>
<LineStyle>
<width>0.5</width>
<color>cc94c934</color>
</LineStyle>
<PolyStyle>
<color>7fffc24f</color>
<outline>0</outline>
</PolyStyle>
</Style>
<Placemark id="p2">
<name>Fleurieu Peninsula Catchment</name>
<snippet maxLines="0"></snippet>
<description>Don't show this</description>
<styleUrl>#default1</styleUrl>
<Polygon>
<outerBoundaryIs>
<LinearRing>
<coordinates>
138.585914080646,-35.3888737733775,0 138.58279412306,-35.3890538078642,0 138.578014195374,-35.3898638645537,0 138.574064275831,-35.3919539205289,0 138.57115435005,-35.3942239666534,0 ...
</coordinates>
</LinearRing>
</outerBoundaryIs>
</Polygon>
</Placemark>
</Document>
</kml>
当我刷新页面时,kml 不再可点击。
谷歌最近是否改变了解释这些事情的方式?
【问题讨论】:
标签: google-maps kml polygon kmz