[OpenLayers-Users] postgis queries

BMcBride bmcbride at chacompanies.com
Fri May 28 11:01:55 EDT 2010


Sure- you can use simple CQL_FILTER queries in your WFS request...

http://suite.opengeo.org/geoserver/wfs?service=WFS&version=1.0.0&request=GetFeature&typeName=usa:states&CQL_FILTER=STATE_NAME='New
York'&outputformat=json

Just make sure to tick the "Return bounding box with every feature" box in
your WFS settings in GeoServer.  

I use this technique for querying attributes and returning the results to an
ExtJS grid.  One of the columns in my grid is a "Map" link, which calls a
map.zoomToExtent function, based on the bbox values returned.  You may also
want to check out the 
http://docs.geoserver.org/stable/en/user/tutorials/cql/cql_tutorial.html?highlight=cql
GeoServer CQL Documentation .

-----
Bryan R. McBride, GISP
http://www.bryanmcbride.com bryanmcbride.com 
-- 
View this message in context: http://osgeo-org.1803224.n2.nabble.com/postgis-queries-tp5113242p5113446.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.



More information about the Users mailing list