Timeline for Render vector tiles with text label in Leaflet
Current License: CC BY-SA 4.0
12 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 8, 2021 at 0:06 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
Aug 5, 2021 at 15:48 | answer | added | J Law | timeline score: 4 | |
Aug 4, 2021 at 18:19 | comment | added | TomazicM | Sounds like a good solution. You could publish it as and answer to your own question (with some code of course), so somebody with similar problems/requirements can benefit from it. | |
Aug 4, 2021 at 1:35 | comment | added | J Law | @TomazicM yes, I forgot to mention that. I had to add coordinates as properties for each point, and also set the style to transparent for the default rendering by VectorGrid. Fell very clumsy. | |
Aug 3, 2021 at 16:37 | comment | added | TomazicM | Good idea! I had something similar in mind with style function, but problem there would be that feature object with coordinates is not available in style function, so point coordinate would have to be one of the properties of the point feature. | |
Aug 3, 2021 at 15:26 | comment | added | J Law | @TomazicM Thank you very much for the inspiration. I came out with a workaround using getFeatureId option of vectorGrid. leaflet.github.io/Leaflet.VectorGrid/…. For each point, I make it into divIcon with their text properties, then add it to collisionLayer to avoid overlapping. github.com/MazeMap/Leaflet.LayerGroup.Collision Very clumsy, but doable. | |
Aug 3, 2021 at 8:49 | comment | added | TomazicM | Ah, now I understand. I once tried to deal with the same problem. Found a bit hacked solution that worked for my needs. It's based on the idea to create text part of features as tooltips dynamically only for the visible features. You can have a look at working JSFiddle here: jsfiddle.net/TomazicM/2o9z53u6. Here 15.000 random points are created and tooltips showed only for zoom levels over 10. Display logic can of course be adjusted to reflect some feature properties. You might get some idea from this. | |
Aug 2, 2021 at 21:12 | comment | added | J Law | @TomazicM. I couldn't find out how to add textual properties in VectorGrids styling. github.com/Leaflet/Leaflet.VectorGrid/issues/67 | |
Aug 2, 2021 at 17:08 | history | edited | TomazicM | CC BY-SA 4.0 |
edited title
|
Aug 2, 2021 at 17:06 | comment | added | TomazicM | Have a look also at Leaflet.VectorTileLayer plugin, which is built on top of Leaflet.VectorGrid. | |
Aug 2, 2021 at 16:57 | comment | added | TomazicM | Whats wrong with vector grid styling: leaflet.github.io/Leaflet.VectorGrid/…? | |
Aug 2, 2021 at 15:25 | history | asked | J Law | CC BY-SA 4.0 |