The behavior is expected. When using just the "line" property a LineSymbolizer is generated, and feature info reacts only when clicking the line. When also having a transparent fill, a PolygonSymbolizer is generated instead, and feature info reacts to the entire polygon
Cheers Andrea On Tue, Oct 19, 2021 at 2:54 PM Iaan Roux via Geoserver-users < geoserver-users@lists.sourceforge.net> wrote: > Hello all, > > > > I have a layer of type Geometry published in Geoserver. It consists of > POLYGON and MULTIPOLYGON records. I further developed 2 styles, which are > the same in CSS and SLD (attached) > > Using Layer Preview I noticed the following: > > 1. When I set the style to the SLD version, GetFeatureInfo is able to > retrieve the record(s) while clicking anywhere inside a geometry. > 2. When I set the style to the CSS version, GetFeatureInfo does not > retrieve the records(s) when clicking inside a geometry for which no fill > style is specified. You can only retrieve a record info by clicking on the > boundary. Only records where a fill style is specified is clickable inside > the geometry. > > > > However, if I publish the layer as a SQL View (i.e. select * from foo) > both the CSS and SLD style works. It seems Geoserver internally force all > geometries to the same type (i.e. Polygon). > > > > Screen shot: > > > > > > When the style is set to CSS, only the red polygons are clickable > > When I set the style to SLD, all polygons are clickable. > > > > > > My question: Is this expected behaviour? (A workaround solution was to set > the fill colour to white and opacity to 0 (also attached)) > > > > Also attached is a small geopackage with sample records > > > > Kind Regards > > > > Iaan Roux > > *Products | Product Manager* > > > > *T* > > +27 87 310 6400 > > *M* > > +27 82 372 2148 > > > > *AfriGIS (Pty) Ltd* > > -25.808611 | 28.256111 > > 446 Rigel Avenue S, Erasmusrand, Pretoria, South Africa > > > > > _______________________________________________ > Geoserver-users mailing list > > Please make sure you read the following two resources before posting to > this list: > - Earning your support instead of buying it, but Ian Turton: > http://www.ianturton.com/talks/foss4g.html#/ > - The GeoServer user list posting guidelines: > http://geoserver.org/comm/userlist-guidelines.html > > If you want to request a feature or an improvement, also see this: > https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer > > > Geoserver-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/geoserver-users > -- Regards, Andrea Aime == GeoServer Professional Services from the experts! Visit http://bit.ly/gs-services-us for more information. == Ing. Andrea Aime @geowolf Technical Lead GeoSolutions Group phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 333 8128928 https://www.geosolutionsgroup.com/ 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
_______________________________________________ Geoserver-users mailing list Please make sure you read the following two resources before posting to this list: - Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/ - The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users