[Geoserver-users] WMS GetFeatureInfo on several layers

Hi,

I am trying to send WMS GetFeatureInfo request to my geoserver instance for several layers at the same time (both for layers and query_layers parameters).

It seems that only the information of first layer with information at the clicked place is returned : is it something expected ?

I know that if I put all my layers in a layer group, I have this behavior but I want to be able to decide which layer to put in my request based on the visibility choices of the user.

···

Alexandre Gacon

It is, the GetFeatureInfo request has a FEATURE_COUNT parameter, that indicate the max number of feature infos to be returned.
That defaults to 1, if not specified, by WMS specification.

The GeoServer layer preview sets it to 50, for example, to show more results, check the URLs the preview is using when clicking on the map.

Cheers
Andrea

···

GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information. == Ing. Andrea Aime @geowolf Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549 http://www.geo-solutions.it http://twitter.com/geosolutions_it ------------------------------------------------------- Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia. This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.

I don’t think that’s the problem.

He doesn’t mention the number of features returned, but only features from one layer are returned.
I came across a similar problem a while ago.

Can you show an example request url? I think it’s related to the values in the “layers” and “query_layers” params. In my case they are exactly the same (and in the same order).

Andrea Aime <andrea.aime@anonymised.com> escreveu no dia sexta, 29/11/2019 à(s) 10:48:

···

www.vfonsecaz.pt