[英]KML icon size google maps API?
我正在使用KML自定义图标,如下所示:
<Style id='icon-1073'>
<IconStyle>
<scale>1.1</scale>
<Icon>
<href>http://www.gstatic.com/mapspro/images/stock/1073-biz-real-estate.png</href>
</Icon>
</IconStyle>
</Style>
但是我似乎无法使用大图标...如果我使用100px x 100px,它仍然会缩小。
根据KML参考 ,Google Maps或Google Maps Javascript API不支持scale标签。
<scale> no
选项:
Google Maps (将图标缩放到固定大小)
Google Maps Javascript API v3 KmlLayer (将图标缩放为固定大小)
geoxml3第三方KML解析器 (支持缩放的图标,但将KML呈现为原生Google Maps Javascript API v3对象,因此对于复杂的KML会出现性能问题)( geoxml3项目页面 )
通过以上链接加载的KML:
<?xml version="1.0" encoding="UTF-8" ?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<Style id='icon-1073'>
<IconStyle>
<scale>2.0</scale>
<Icon>
<href>http://www.gstatic.com/mapspro/images/stock/1073-biz-real-estate.png</href>
</Icon>
</IconStyle>
</Style>
<Placemark>
<name><![CDATA[]]></name>
<description><![CDATA[]]></description>
<styleUrl>#icon-1073</styleUrl>
<Point>
<extrude>1</extrude>
<altitudeMode>relativeToGround</altitudeMode>
<coordinates>71.3232421875,21.596150576461437,0</coordinates>
</Point>
</Placemark>
</Document>
</kml>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.