地图更改大小的问题取决于选中的图层。

时间:2014-06-11 09:21:28

标签: openlayers geoserver

我是OpenLayers的新手,我已经开始构建一个将Google磁贴和我自己的wms组合在Geoserver上的应用程序。代码示例:

var hilirPerak = new OpenLayers.Layer.WMS("hilirPerak",    
       "http://>>localhost:8080/geoserver/hilirPerak/wms", 
         {  
            workspace: 'hilirPerak', layers: 'hilirPerak:lot', styles:'',
            format: 'image/png', tiled: true, transitionEffect: 'resize', 
            units: 'degrees'
         },
         {
            maxResolution: 1000,
            singleTile: false, 
            ratio:1,
            isBaseLayer:false,
            tilesOrigin : map.maxExtent.left + ',' + map.maxExtent.bottom,
            buffer: 0,
            visibility:true,
            maxExtent: OpenLayers.Bounds.fromString("3.873635,4.074956,101.14974"),
            //ratio: 1.9,
            //buffer: 0,
            //displayOutsideMaxExtent: true,
            //isBaseLayer: true,
            yx : {'EPSG:4326' : true},
            displayOutsideMaxExtent: true,
            transparent:true    
           }
  );

这是有效的,对于基本地图,我使用的是Google磁贴,但问题是,当我单击复选框激活另一个图层时,基本地图会将大小更改为所选图层的大小。

0 个答案:

没有答案
相关问题