[OpenLayers-Users] In the WMS GetFeatureInfo request, the params X and Y is necessary and must be specified ?

ahwangyuwei at sina.com ahwangyuwei at sina.com
Thu Apr 8 08:46:01 EDT 2010


 Thak you !
  the params X and Y is necessary and must be specified ?
Can I use  CQL_FILTER rather than x,y to get some features?
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',
                       //X: e.xy.x,
//Y: e.xy.y,
                        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/6cbc5408/attachment.html


More information about the Users mailing list