2014-01-27 57 views
1

我使用KML的自定義圖標,像這樣:KML圖標大小谷歌地圖API?

 <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> 

,但我似乎無法如果我使用一個100像素100像素仍然對其進行適當縮小使用大圖標... 。

+1

是否使用[谷歌地圖(http://maps.google.com)?您是否願意使用Google Maps Javascript API v3?您的KML有多複雜? – geocodezip

回答

2

根據KML reference,縮放標記在Google地圖或Google Maps JavaScript API中不受支持。

<scale> no 

選項:

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>