openlayer拖动范围设定

来源:互联网 发布:刻录软件找不到文件 编辑:程序博客网 时间:2024/05/16 14:37
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范围一直就解决了


1 0
原创粉丝点击