var mapOptions = {
projection : new OpenLayers.Projection('EPSG:4326'),
maxExtent : new OpenLayers.Bounds(121.95669802850942,37.302124678674154,122.73295650645256,37.63564806886632),
// maxExtent : new OpenLayers.Bounds(-180, -90, 180, 90),
restrictedExtent:new OpenLayers.Bounds(121.95669802850942,37.302124678674154,122.73295650645256,37.63564806886632),
units : "degrees",// 单位度
controls : []
// 清空控件
};
map = new OpenLayers.Map('map',mapOptions);
问题:在使用openlayer2 图片地图的时候,图片拖动后背景会有空白
解决:
restrictedExtent与maxExtent范围一直就解决了