Closed derwaldgeist closed 11 months ago
Hi @derwaldgeist 👋
There is a separate React wrapper for Mapbox GL Draw: https://github.com/urbica/react-map-gl-draw
Wow, I did not see that, that's awesome! Thanks for the super fast response.
Does it work with mapbox-gl 1.x? I am still using this version because I am connecting to maptiler instead of mapbox, as it is a cheaper service.
I had tried to integrate the regular drawing package (not the urbica one) yesterday. It kind of worked, but when I tried to add a Feature on load, I got an exception ("ctx.store" was not found). Will try your version now.
Have a Happy New Year!
Ok, it works! Thanks again!
We'd like to have the user draw a simple rectangle on top of the map, to mark a specific region. Is such interactivity possible with this library?
I found this addon for react-map-gl, but I don't know if it is possible to make it work with Urbica's implementation:
https://github.com/mapbox/mapbox-gl-draw
Basically, I want to achieve something like this:
https://visgl.github.io/react-map-gl/examples/draw-polygon