Reputation: 129
I am using geoserver, and POSTGIS and, I tried to Get Database informs from postgis on openlayers, So My question is:
Upvotes: 2
Views: 839
Reputation: 1182
You can use SQL View on Geoserver Side. You write you SQL request with the params you want to query like select info from country where country = '%param%'
and then request the WMS with mergeParams where param is &viewparams=country:[the country you want]
Here's the link to Geoserver's doc which is pretty well explained : http://docs.geoserver.org/stable/en/user/data/database/sqlview.html
Upvotes: 1