Google Maps API V3方法fitBounds()
我有渲染地图的代码。 function initialize() { var myOptions = { center: new google.maps.LatLng(45.4555729, 9.169236), zoom: 13, mapTypeId: google.maps.MapTypeId.ROADMAP, panControl: true, mapTypeControl: false, panControlOptions: { position: google.maps.ControlPosition.RIGHT_CENTER }, zoomControl: true, zoomControlOptions: { style: google.maps.ZoomControlStyle.LARGE, position: google.maps.ControlPosition.RIGHT_CENTER }, scaleControl: false, streetViewControl: false, streetViewControlOptions: { position: google.maps.ControlPosition.RIGHT_CENTER } }; var map = new google.maps.Map(document.getElementById("mapCanvas"), myOptions); …