使用 Google Map API v3 的 fitBounds 函数总是使边界小于画布大小,如下所示:
gMap.fitBounds(bounds);
new google.maps.Rectangle({
strokeColor: '#0000FF',
strokeOpacity: 0.8,
strokeWeight: 1,
fillColor: '#0000FF',
fillOpacity: 0.05,
map: gMap,
bounds: bounds
});
有没有办法使绑定适合画布大小?