[OpenLayers-Users] GetFeatureInfo multiple layers
Rodrigo
rca.cirdan at gmail.com
Thu Sep 25 13:00:27 EDT 2008
Hello Nina!!
I believe that you want to get the info of all the layers of your map at a
single click
into a determined position, right?
So, at QUERY_LAYERS param, you'll have to write what Mika said, but leaving
the
index off (map.layers.params.LAYERS) , this way, all the array will be sent
to the query! (I beleve this should work)!
You said about layerlist...
If you notice, the "layerlist" at the OpenLayers site's example is declared
as a list of
layers names:
http://trac.openlayers.org/wiki/GetFeatureInfo (line 3 of the first code ;)
)
(I don't know if you have declared it.. but.. it's there...hehehe)
Oh and...I don't know if you have overlays in your map, but, if you do,
maybe is better to take care about the visibility of layers...
I've made some tests and discovered that even when a overlay is not showed
in the map, the getFeatureInfo returns it's infos when you use a query param
like this (map.layers.params.LAYERS), because you pass the layer to the
query anyway... XD
Only some adjusts can fix this, if necessary.. =)
I hope I have helped! =)
Rodrigo
On Thu, Sep 25, 2008 at 8:24 AM, Lehtonen, Mika <mika at digikartta.net> wrote:
> 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
> >
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
--
======================================
Rodrigo C. Antonialli
Rio Claro - SP - Brasil
Contato: (19) 9757-0370
rca.cirdan at gmail.com
rcantonialli at gmail.com
Skype: rc_antonialli
http://www.linkedin.com/in/rcaprofile
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080925/7e170cca/attachment.html
More information about the Users
mailing list