2015-02-06 134 views
0

我使用谷歌地圖API v3.17如何更改Google地圖縮放控件樣式?

這裏是我的代碼:

this._options = { 
     zoom: this._params.zoom, 
     center: new google.maps.LatLng(this._params.center.lat, this._params.center.lng), 

     // Disabled controls 
     mapTypeControl: false, 
     panControl: false, 
     scaleControl: false, 
     streetViewControl: false, 

     // Zoom control 
     zoomControl: true, 
     zoomControlOptions: { 
      style: google.maps.ZoomControlStyle.SMALL, 
      position: google.maps.ControlPosition.RIGHT_BOTTOM 
     }, 

     // Disable scrollwheel and double-click zooming 
     scrollwheel: false, 
     disableDoubleClickZoom: true // Because clicking through images results in a zoom 
    }; 

    this._map = new google.maps.Map(this._el, this._options); 

我發現了一個老式的谷歌地圖,很少變焦圖標(見圖片,左側)。

我正在尋找的是更大的圖標,每個API文檔(見圖片,右側)。

我的代碼是相同的他們說這樣做......我缺少什麼呢?

謝謝!

+1

注意[「signed_in」地圖是不是在v3.17使用(http://jsfiddle.net/cw34pkvy/5/) ,但[從3.18開始](http://jsfiddle.net/cw34pkvy/6/) – geocodezip 2015-02-06 20:48:36

回答

1

條款SMALLLARGE誤導了一下,它們與尺寸無關,它們的意思是與縮放控制一起使用:隱藏或顯示滑塊。

沒有設置「尺寸」的內置選項。

您在右側看到的內容似乎是signed-in map,它使用不同的控件。

注:登錄狀態下圖不是在v3.17提供

+0

謝謝,我曾嘗試使用登錄地圖,認爲這是問題,但它並沒有改變一件事。 – 2015-02-06 20:24:41

+1

v3.17中沒有簽名地圖 – geocodezip 2015-02-06 20:50:21

+0

謝謝,這就回答了! – 2015-02-06 21:23:21

相關問題