[OpenLayers-Users] GetFeatureInfo multiple layers

Ian Turton ijturton at gmail.com
Thu Sep 25 09:25:57 EDT 2008


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
-- 

Ian Turton
http://www.geotools.org
http://pennspace.blogspot.com/



More information about the Users mailing list