[OpenLayers-Users] GetFeatureInfo multiple layers

Nina Helle-Mildt helle at sdac.hannover.bgr.de
Thu Sep 25 10:14:38 EDT 2008


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



More information about the Users mailing list