mhsattarian / mapbox-gl-draw-select-mode

A custom mode for MapboxGL-Draw to select features that highlights features on hover.
https://mhsattarian.github.io/mapbox-gl-draw-select-mode/
MIT License
2 stars 2 forks source link

Fixed @mapbox/mapbox-gl-draw package import resolution errors #2

Closed NattieGit closed 10 months ago

NattieGit commented 1 year ago

The @mapbox/mapbox-gl-draw imports were out of date, so this package did not work when installed. As expected, these errors also occurred when running npm run dev after cloning this repository.

This fix resolves those errors. npm run dev now works with no resolution errors :)

mhsattarian commented 10 months ago

Thank you @NattieGit for this, mergin now. and sorry for the late response.

mhsattarian commented 10 months ago

I tested the code using node 18 and it didn't work properly. I updated dependencies and imports. you can see the result in here:

https://github.com/mhsattarian/mapbox-gl-draw-select-mode/blob/dd7fde48f828908f52a20d877b2190bc51bd38f9/src/mode.js#L1-L4