[OpenLayers-Users] GetFeatureInfo multiple layers

Lehtonen, Mika mika at digikartta.net
Thu Sep 25 07:24:42 EDT 2008


Hi Nina,

I use this to get a particular layer info:

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

I really don't know how to choose all the layers, but maybe someone knows. I don't know what happens if you leave the index off...

cheers,
mika




Nina Helle-Mildt kirjoitti:
> Hey,
>
> thanks for your replay Ian. Of course I missed the QUERY_LAYERS but that 
> doesn't seem to be all. I tried with
>
> QUERY_LAYERS: layerlist
>
> and with
>
> QUERY_LAYERS: wms.params.LAYERS.
>
> Unfortunately without success. Any other ideas or examples?
>
> Thanks,
> Nina
>
>
>
>
> Ian Turton wrote:
>   
>> On Thu, Sep 25, 2008 at 3:59 AM, Nina Helle-Mildt
>> <helle at sdac.hannover.bgr.de> wrote:
>>     
>>> Hey there,
>>>
>>> so far I've been able to query one overlay layer, following the Feature
>>> Info Example on the OpenLayers homepage. Now I'm trying to query all
>>> existing overlay layers - but with little success.
>>>       
>> I work with GeoServer instead of mapserver but the parameters should
>> be the same (at least that's what I tell my students) so I think you
>> are missing the  QUERY_LAYERS: as below.
>>
>>     
>>> function findLayerClick(event) {
>>>
>>> layerlist = "seis,seis_ger";
>>> OpenLayers.Util.getElement('nodeList').innerHTML = "Einen Moment bitte ...";
>>> var url = map.getFullRequestString({
>>>        REQUEST: "GetFeatureInfo",
>>>         EXCEPTIONS: "application/vnd.ogc.se_xml",
>>>         BBOX: map.getExtent().toBBOX(),
>>>         X: event.xy.x,
>>>         Y: event.xy.y,
>>>         INFO_FORMAT: 'text/html',
>>>       
>>      QUERY_LAYERS: wms.params.LAYERS,
>>
>>     
>>>         WIDTH: map.size.w,
>>>         HEIGHT: map.size.h},
>>>         "http://www.seismologie.bgr.de:8080/cgi-bin/mapserv?");
>>>        OpenLayers.loadURL(url, '', this, setHTML);
>>>        Event.stop(event);
>>>        }
>>>
>>>       
>> Ian
>>     
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>   




More information about the Users mailing list