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 am trying to create GeoExt action button to fetch the feature info from all the layers. I am still getting the info for my point features but I am getting nothing for the usa:states, that appears in the geoserver by default.

When I looked into the firebug, the html for states does not have anything in it's , But the species data that I am adding has the contents in the , The contents in the body are the result of passing evt.text param, which is assigned to the html: evt.text in my addToPopup() function.

Why is this happening?


I am sorry i forgot to add the addToPopup() function before.

I thought that maybe there was no data in the usa:states layer, but it does have the data. If you click on the polygon in this app,,24.956,-66.97,49.372&width=780&height=330&srs=EPSG:4326&format=application/openlayers

You can see the data in the polygon.

share|improve this question
Can you add the relevant sections of your code to this post, please? That may help in diagnosis of the problem. – user3461 Aug 31 '12 at 18:36
sorry about that @Kevin, I have updated the question. – Sam007 Aug 31 '12 at 18:47
up vote 0 down vote accepted

It is because yor WMS layers have different URLs and your WMSGetFeatureInfo control doesn't listen any layers event except "pima". Try to configure WMSGetFeatureInfo control the following way:

new OpenLayers.Control.WMSGetFeatureInfo({
    drillDown: true,
    autoActivate: true,
    infoFormat: "application/vnd.ogc.gml",
    queryVisible: true,
share|improve this answer
Ok now I am not getting the pima features. The states is working fine. Here is my code, – Sam007 Sep 4 '12 at 18:33
Oh it seems that if I switch off the USA layer, then I can view the Pima features. Also, once I switch off the USA states layer and then turn it on again, the tool does not collect the states features and the features are empty – Sam007 Sep 7 '12 at 16:28
sorry to bother you again, but pls help? – Sam007 Sep 13 '12 at 19:26
@Sam007, I've modified my answer, please check it out. I've tested this solution and it works fine - both pima and states layers are queryable. – drnextgis Sep 14 '12 at 10:27
Thanks a lot that works – Sam007 Sep 17 '12 at 16:02

Your Answer


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

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