I have a POI table with some data of categories like Airport,ATM,Bank etc. I want to show these categories as checkbox so that if I click in the ATM Checkbox, only the ATM Points will be display. Is there any option in Geoserver?
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.Sign up to join this community
Achieving this will involve both the client library you are using as well as GeoServer. On the GeoServer part, you can retrieve the names of the ATMs using
gs:Unique WPS process. To use the WPS process, you must have installed the WPS plugin. Refer to this for details on GeoServer WPS plugin.
You can create the
gs:Unique query to use in your request using the WPS Query Builder. You can then copy the process XML to your client, issue a POST request from your client to GeoServer's WPS URL, something like localhost:8080/geoserver/wps. You can specify that you want your response in XML or JSON format in your POST request. With the ATM names now on the client side, you can choose to represent them to end users with checkboxes. Refer to this to see how to use
POST with OpenLayers, and how to access the response.
Based on a user's selection, you can use CQL filters to selectively display a
Point (ATM). Refer to this for details on CQL.
UPDATE: I'm assuming you already have your data in PostGIS, and have already created a feature type (layer) based on the PostGIS table.