r-spatial / leafgl

R package for fast web gl rendering for leaflet
https://r-spatial.github.io/leafgl/
Other
266 stars 32 forks source link

Stroke color different to fillcolor? #100

Open coppertank opened 3 weeks ago

coppertank commented 3 weeks ago

I was wondering if it was possible to change the color of the polygons' border and make it different from the fill color. On light colored polygons, in fact, the border is not very visible. Screenshot 2024-10-29 140416

tim-salabim commented 3 weeks ago

I don't think this is supported by the upstream repo.

mtennekes commented 3 weeks ago

Same issue. So not possible to change the border color and width?

If not, a workaround is to addGlPolylines for this purpose.

tim-salabim commented 3 weeks ago

Sorry @mtennekes I don't think leaflet.glify supports this. In mapview I simply render the borders on top of the polygons. See https://github.com/r-spatial/mapview/blob/master/R/sf.R#L317-L331