[OpenLayers-Users] Querying multiple layers

ajohnson at ecotropolis.com ajohnson at ecotropolis.com
Thu Dec 4 16:22:09 EST 2008


I have a map with multiple layers (view at
http://ecotropolis.com/maps/NorthAmericaWatershed.html) and I want to be
able to click on a feature of any of the maps and retrieve data from the
WMS (I'm using Geoserver).

I initially got it working using the following line in getFullRequestString:

 QUERY_LAYERS: map.layers[1].params.LAYERS,

This works with one map. I tried extending it to two layers:


 QUERY_LAYERS: map.layers[1].params.LAYERS, map.layers[2].params.LAYERS,

but that gave me an error. I got it to run using the following:

  QUERY_LAYERS: wms.params.LAYERS,

Which gives me data, but it is generic for the entire layer to which the
selected feature belongs instead of specific to a particular element. How
can I set this up to query multiple layers and return information specific
to the selected feature?

Regards,

Amy



More information about the Users mailing list