Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using GeoExt.Popup to create a popup when a user click on an WFS (point) on the map. When the user click on a point on the map I want to send the GID (primary key from DB) to a servlet or JSP to send back HTML with all information about that point (using iframe inside the GeoExt Popup).

I don't know how to get the GID value for the point that user clicked. Any one knows how to get an attribute from the map?

I'm using this code:

    if (popup) {
    popup = new GeoExt.Popup({
    title: "Info:",
    width: 600,
    height: 350,
    margin: 1,
    autoScroll: true,
    maximizable: true,
    collapsible: true,
    map: map,
    location: map.getLonLatFromPixel(e.xy), 
    //html: e.text
    html: "<iframe src='response.jsp?codVertices=1' width='100%' height='100' frameborder='0'></iframe>"});;

In the "HTML" option I want to get the GID and send it to the servlet or JSP. It's working fine when I manually insert the GID in the html code...

Thank you very much. Pedro

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.