我正在使用Google Maps API v3.17
这是我的代码:
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文档,我正在寻找更大的图标(参见图片,右侧)。
我的代码与他们所说的相同......我错过了什么?
谢谢!
答案 0 :(得分:1)
条款SMALL
和LARGE
有点误导,它们与大小无关,它们意味着与缩放控件一起使用:隐藏或显示滑块。
没有内置选项来设置"尺寸"。
您在右侧看到的内容似乎是signed-in map,它使用不同的控件。
注意:v3.17中没有登录的地图