const featureRequest = new ol.format.WFS().writeGetFeature({ srsName: "EPSG:4326", //这里的EPSG不要改为4326,可能无法显示? featureNS: "http://geoserver.org/WS", //这里是工作空间中的命名空间url featurePrefix: "WS", //工作区域 featureTypes: ["CJ",], outputFormat: "application/json", //数据返回格式 //相等查询 // filter: ol.format.filter.equalTo("OBJECTID", encodeURIComponent( // attributeValue)) //查询的属性与查询的值,这里attributeValue是string
//单个模糊查询?? CJ_XZQ //filter: ol.format.filter.like("XZQMC", "*" + attributeValue + // "*"), //查询的属性与查询的值,这里attributeValue是string
//多个模糊查询字段
filter: ol.format.filter.or( // xzqmcFilterXZQ, // xzqmcFilterXZQDM, xzqmcFilterCJ, xzqdmFilterCJ, ), });
标签:ol,attributeValue,format,查询,filter,Openlayers,WS,图层 From: https://www.cnblogs.com/yu-beng/p/17624454.html