protomaps / protomaps-leaflet

Lightweight vector map rendering + labeling and symbology for Leaflet
https://protomaps.com/docs/frontends/leaflet
BSD 3-Clause "New" or "Revised" License
767 stars 43 forks source link

Rendering artefact with symbolizers created from Mapbox style #159

Closed claustres closed 4 months ago

claustres commented 4 months ago

In an effort to pursue the support of this kind of style, we get pretty good results but we struggle with a rendering artefact that maybe someone could help identify the root cause. It appears that some lines seems to be "filled", it's certainly not a bug but probably a misusage, here is a rendering at different zoom levels: Capture d’écran du 2024-07-12 11-57-17 Capture d’écran du 2024-07-12 11-57-21 Capture d’écran du 2024-07-12 11-57-25

Any insight is welcome, thanks.

bdon commented 4 months ago

Are you attempting to use a PolygonSymbolizer on a line feature?

You should first filter any rules that use polygon fill operations to only features with polygon geometries.

Are you mutating the context2d of the canvas in a custom Symbolizer and not resetting it at the end?

claustres commented 4 months ago

Find it out with your help and actually the help of feature picking to identify the failing features/rules !

I was not correctly manage filtering on geometry types so that some polygon symbolizers was run over line features.

Thanks.