[GIS] Displaying feature info in a popup

getfeatureinfomapserveropenlayers-2

I was able to "combine my shapefile and CSV data have made a lot of progress on my project.

Now I want to display the attribute data in a popup when I either click or hover over a country… I've done some goggling and looked at some examples but can't seem to make what I've seen work…

Can someone recommend a link or example I can look at?

I'm using MapServer and OpenLayers

Let me know if you'd like to see my script.

Best Answer

I'd suggest checking this openlayers example: getfeatureinfo-control. It shows the feature info in a table on the page. Putting it into a popup should be easy changing some lines in the javascript.

In general openlayers.org/dev/examples/ is a good resource for openlayers code snippets.