读书人

google 地图 根据marker的多少设置中心

发布时间: 2012-08-30 09:55:54 作者: rapoo

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 楼 sangdiyage 2012-01-13 这个map api v3的吗? 2 楼 yi_17328214 2012-02-15 这个是v2的,
V3也有这个东西的。

读书人网 >Web前端

热点推荐