Closed aninikol closed 11 months ago
Thanks for noticing! Could you make a PR, please?
PR #24
Constants can be accessed directly from the Mapbox object so there is no need to import from src/constants
There are other objects accessed from mapbox-gl-draw as well. The full list is visible by running npm run dev
. After upgrading mapbox-gl-draw, Rollup complains about missing external dependencies.
https://rollupjs.org/guide/en/#warning-treating-module-as-external-dependency
@mapbox/mapbox-gl-draw/src/constants (imported by src/constants.js)
@mapbox/mapbox-gl-draw/src/lib/double_click_zoom (imported by src/modes/draw_circle.js)
@mapbox/mapbox-gl-draw/src/lib/common_selectors (imported by src/modes/draw_circle.js)
@mapbox/mapbox-gl-draw/src/lib/create_vertex (imported by src/utils/create_geodesic_geojson.js)
It seems that the upgrade is more complex.
Done in 2.3.0.
With the upgrade of mapbox-gl-draw from 1.3 to 1.4 the Constants can be accessed directly from the Mapbox object so there is no need to import from src/constants which is causing an error when using the mapbox-gl-draw-geodesic specifically to the file mapbox-gl-draw-geodesic/src/constants.js. Here is the PR of mapbox-gl-draw change. Code should be updated in order for the geodesic package works with the 1.4 version of mapbox-gl-draw