根据坐标限制显示区域、限制地图拖拽范围
function moveLimit(){
var strictBounds = new google.maps.LatLngBounds(
new google.maps.LatLng(36.54539,120.02950), //左下
new google.maps.LatLng(36.41766,120.16442)//右上
);
google.maps.event.addListener(map,'dragend',function(){
if (strictBounds.contains(map.getCenter()))return;
var c = map.getCenter(),x = c.lng(),y = c.lat(),maxX = strictBounds.getNorthEast().lng(),maxY = strictBounds.getNorthEast().lat(),minX = strictBounds.getSouthWest().lng(),minY = strictBounds.getSouthWest().lat();
if(x <minX)x = minX;
if(x> maxX)x = maxX;
if(y <minY)y = minY;
if(y> maxY)y = maxY;
map.setCenter(new google.maps.LatLng(y,x));
});
}