I work with openlayers and geoserver. I'm searching for code that when I click on a point of a layer on the map, a popup window appears that contains information from the database (postgres) for this point.
Can you help me please?
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 communityI work with openlayers and geoserver. I'm searching for code that when I click on a point of a layer on the map, a popup window appears that contains information from the database (postgres) for this point.
Can you help me please?
You have such a tool in your GeoServer layer preview OpenLayers app. It creates GetFeatureInfo request when you click at your map. It does not make a popup but shows info below the map. The Openlayers control is here http://dev.openlayers.org/docs/files/OpenLayers/Control/WMSGetFeatureInfo-js.html and a demo is here http://openlayers.org/en/master/examples/getfeatureinfo-image.html