Geovation / labelgun

🏷️ reducing label clutter across mapping libraries
https://geovation.github.io/labelgun/
113 stars 10 forks source link

Leaflet.VectorGrid implementation #32

Open tomchadwin opened 6 years ago

tomchadwin commented 6 years ago

An example in use with Leaflet.VectorGrid would be incredibly useful. As it stands, L.VectorGrid doesn't handle labelling. There are a couple of open PRs which could enable it, but they all produce one label per feature per tile. This means blurry text if Tooltips with no background are used.

If Labelgun could be implemented, it would automatically get rid of the duplicate labels (this was @perliedman's idea). However, I'm not having any joy implementing it with L.VectorGrid. The Leaflet example uses L.LayerGroup.eachFeature(), but this is not available in L.VectorGrid.

Any help would be very welcome indeed.

JamesLMilner commented 6 years ago

Only concern is VectorGrid as open Pull Requests from last year with no comments or interactions. I'd be worried about doing this work and then it not getting reviewed. Happy to review if that situation becomes a bit more promising!

tomchadwin commented 6 years ago

Yeah, I got no feedback on my PRs for https://github.com/Leaflet/Leaflet.VectorGrid:

https://github.com/Leaflet/Leaflet.VectorGrid/pull/129 https://github.com/Leaflet/Leaflet.VectorGrid/pull/130 https://github.com/Leaflet/Leaflet.VectorGrid/pull/131

Frustrating, as I think my changes are required for some very common styling conditions (eg OSM). It's probably down to my lack of knowledge of Git to produce a tidy PR (they are not squashed/rebased), But @IvanSanchez also disagreed that https://github.com/Leaflet/Leaflet.VectorGrid/pull/129/files was necessary - I don't know why, as I needed it to get it to work. @perliedman

IvanSanchez commented 6 years ago

Unfortunately I am not able to spend much time on Leaflet, let alone Leaflet.Vectorgrid. 😐

My complaints might have been rooted in the mapbox branch I was working on (https://github.com/Leaflet/Leaflet.VectorGrid/tree/mapbox) - i.e. being able to provide a mapbox-like stylesheet, and creating VectorGrid rules for that. I had an architecture in my head for that, but I cannot work on that much more, so I might just accept the PRs as they are. (If that sounds fine)