[OpenLayers-Users] How to use WMS GetFeatureInfo to get featureInfo
with CQL Filter?
ahwangyuwei at sina.com
ahwangyuwei at sina.com
Thu Apr 8 04:18:21 EDT 2010
Thak you !
I am usding GetFeatureInfo to get Feature Info.
Read a Textfield 's value ,then use it as filter.
I want to know how to write the params and which params are necessary.
The exception is Could not parse CQL filter list.
Lexical error at line 1, column 11. Encountered: "\u2018" (8216), after
: "". Parsing : NAME LIKE ‘?E2??. Current Token : "NAME"
.
How should I set these params and CQL_FILTER?
var params = {
REQUEST: "GetFeatureInfo",
EXCEPTIONS: "application/vnd.ogc.se_xml",
BBOX: map.getExtent().toBBOX(),
INFO_FORMAT: 'application/vnd.ogc.gml',
QUERY_LAYERS: map.layers[0].params.LAYERS,
FEATURE_COUNT: 50,
Layers: 'CHN',
Styles: '',
Srs: 'EPSG:4326',
format: format};
Request=OpenLayers.loadURL("http://159.226.13.203:8080/geoserver/wms?CQL_FILTER=NAME LIKE ‘%上海%’", params, this, highlight, setHTMLx);
}
function highlight(response){
document.getElementById('nodelist').innerHTML = response.responseText;
alert("sss");
var doc = response.responseXML;
if(!doc || !doc.documentElement) {
doc = response.responseText;
}
features = parseformat.read(doc);
highlightLayer.addFeatures(features);
};
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100408/62bc8265/attachment.html
More information about the Users
mailing list