3 ms·
I love Leaflet (and contributed quite a bit over the years). The layer architecture can be easily combined with React. Just write react-components for the laye
by cel1ne 10y ago
I love Leaflet (and contributed quite a bit over the years).
The layer architecture can be easily combined with React. Just write react-components for the layers, shapes, or markers and use React's lifecycle-hooks to add/remove them from the map.
https://gist.github.com/fab1an/f040edbd939989d3a2557f15d2b9ee02 https://gist.github.com/fab1an/f040edbd939989d3a2557f15d2b9e...
- chickenfries 10y agoThanks for the contributions and for the example! I'm just getting started with React and its useful to see examples with integrating non-react JavaScript libraries like leaflet.
- killahpriest 10y agohttps://github.com/PaulLeCam/react-leaflet https://github.com/PaulLeCam/react-leaflet
- vbs_redlof 10y agoWhy was this downvoted? Is there something wrong with this approach?