WMS图层中图层参数变更

var baseLayer;

   map = new OpenLayers.Map(‘mapdiv’,{
   controls:[],
   maxResolution:”auto”, 
   maxExtent:new OpenLayers.Bounds( 118.028307,27.144934,122.951907,31.182734),
     numZoomLevels:9});  
 
     baseLayer= new OpenLayers.Layer.WMS (‘矢量地图’,
            “http://192.168.1.113:8888/cgi-bin/geobrainwms.exe“,
         {
        layers:[‘zj_region’, ‘zj_c_line’,’zj_r_line’],
      format      : ‘image/png’
         }, {
         // singleTile : true
        
         });

baseLayer.mergeNewParams( {layers:[‘zj_r_line’]});

转载自:https://blog.csdn.net/fjun0910/article/details/6127393

You may also like...