0

i want to display popup information over WMS service file that i published from geoserver and using it Leaflets. Below is the picture for illustration. enter image description here

Now i just want when user click any polygon the information related to it will be display as popup from postgis database, what are the possible ways to fetch information db ?

I am new to WebGIS.

1 Answer 1

3

If you already have a GeoServer WMS service, then the most straightforward way is to use the getFeatureInfo capabilities of the WMS protocol. See https://github.com/heigeo/leaflet.wms and http://docs.geoserver.org/latest/en/user/services/wms/reference.html#wms-getfeatureinfo

4
  • Thanks lvanSanchez,... but if i also want to display other information related to each polygon in popups from Postgresql DB rather then PostGIS then what are the options ?. I want to display small picture related to each polygon and some attribute information which is stored in RDBS. Thank you
    – Ahsan
    Commented Jun 26, 2016 at 6:05
  • If you want to rely on your WMS: Click on map → get some ID of the polygon where the user clicked → use that ID to request the picture → display the picture. Commented Jun 27, 2016 at 8:03
  • Okay thank you very much lvanSanchez, let me try this thing,
    – Ahsan
    Commented Jun 27, 2016 at 19:17
  • I tried above provided link for info, but nothing happens. Whenever i use GetFeatureInfo function my WMS layers don't appear, i am using leaflets. Can you please help me ?
    – Ahsan
    Commented Jul 12, 2016 at 16:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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