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: ‘ ’
}



评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值