Closed Pierre-Saigot closed 4 months ago
I will work on adding a new component for this in the next update.
For now I was able to get it to work in the playground with useMapbox
:
import MapboxDraw from '@mapbox/mapbox-gl-draw';
import '@mapbox/mapbox-gl-draw/dist/mapbox-gl-draw.css'
useMapbox(MAP_ID, (map) => {
const Draw = new MapboxDraw();
map.addControl(Draw, 'top-left');
});
Indeed, I hadn't thought of doing it like that! Thank you.
Hello,
As far as I'm aware, we currently cannot use Mapbox Draw with Nuxt Mapbox. I tried to make it work by importing the library directly alongside mapbox-nuxt, but it led to a lot of errors and incompatibilities. Is there a possibility of having Mapbox Draw as a component in the future?
Thanks in advance.