Google マップ アプリケーションでこのリーフレット fitBoundsのようなものが必要です。いくつかの例を見ましたが、期待どおりに機能しません。divをGoogleマップコントローラーとして作成し、境界を手動で拡張しようとしましたが、何も機能しませんでした...
function zoomToBounds(polygon){
bounds = new google.maps.LatLngBounds();
$.each(polygon, function( key, latLng ) {
bounds.extend(new google.maps.LatLng(latLng.lat, latLng.lng));
});
/////////////////////////////////////////////////////////////
// We saw a solution like this, but the zooming is a problem
//
// Extend bounds with a fake point:
/////////////////////////////////////////////////////////////
/*
if (this.map.getProjection()) {
proj = this.map.getProjection();
latlng = bounds.getSouthWest();
swPoint = proj.fromLatLngToPoint(latlng);
latlng2 = proj.fromPointToLatLng({
x: swPoint.x - 10,
y: swPoint.y
});
bounds.extend(latlng2);
}*/
this.map.fitBounds(bounds);
}