google map 根据marker的多少设置中心点和缩放比例
function changePan(){ var latlngbounds = new GLatLngBounds( );latlngbounds.extend(new GLatLng(39.907,116.387));latlngbounds.extend(new GLatLng(39.935,116.407));latlngbounds.extend(new GLatLng(39.944,116.432));latlngbounds.extend(new GLatLng(39.924,116.427));map.setCenter( latlngbounds.getCenter( ), map.getBoundsZoomLevel( latlngbounds ) );}
页:
[1]