openlayers中mergeNewParams函数点滴

官方的介绍是
mergeNewParams:function( newParams )

Catch changeParams and uppercase the new params to be merged in before calling changeParams on the super class.

Once params have been changed, the tiles will be reloaded with the new parameters. 【大致意思就是说,该函数捕获改变的参数,当参数变化 瓦片图层将重载】

Parameters

newParams

{Object} Hashtable of new params to use

参数还是举例说明吧

 locator = new OpenLayers.Layer.WMS(
                        "分站定位器", "http://172.16.0.81:8080/geoserver/mine/wms",
                        {
                            LAYERS: 'mine:locatorinfo',
                            format: 'image/png',
                            transparent: "true"
                        },
                        {isBaseLayer: false}
                    );
            
                map.addLayers([locator]);
                
                locator.mergeNewParams({cql_filter:'equipment_type=1'});
因此知道 newParams = {
format: ' ',
styles: ' ',
format_options:' ',
palette: null,
filter: ‘ ’,
cql_filter: ‘ ’,
featureId: ‘ ’
}



你可能感兴趣的:(GIS)