This question already has an answer here:

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?

marked as duplicate by PolyGeo Sep 23 '14 at 8:05

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.