mapbox-gl-draw
mapbox-gl-draw copied to clipboard
I am facing build issue with imports, is this related to new push ?
Hi @Sehbaz,
Thank you for opening this ticket! Could you please provide a minimal demonstration of the issue to help the maintainers and community understand and address the problem accurately?
Hi @Sehbaz,
Thank you for opening this ticket! Could you please provide a minimal demonstration of the issue to help the maintainers and community understand and address the problem accurately?
I am building custom tools in mapbox using this library where i am importing modes in a file. Till 05/02/2023 it was working fine and i was to build my project for deployment. But all if sudden this imports started throwing error.
IMPORTS:
Package.json
Is it a TypeScript project? Most likely, this is caused by the old typings that should be updated in the DefinitelyTyped project https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mapbox__mapbox-gl-draw
Is it a TypeScript project? Most likely, this is caused by the old typings that should be updated in the DefinitelyTyped project https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mapbox__mapbox-gl-draw
Thank you, will give that a go.
Is it a TypeScript project? Most likely, this is caused by the old typings that should be updated in the DefinitelyTyped project https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mapbox__mapbox-gl-draw
it is a VUE project.
I'm having the same problem. The thing is npm installing "@mapbox/mapbox-gl-draw" doesn't come with the "src/" folder anymore. Some other packages rely on the "src" to function correctly.
An example would be: "mapbox-gl-draw-passing-mode" or "mapbox-gl-draw-select-mode"
@bernardiego What was your solution ?
I had to force install version 1.3.0 of "@mapbox/mapbox-gl-draw".
... "@mapbox/mapbox-gl-draw": "1.3.0", (Instead of "^1.3.0") ...
Is it a TypeScript project? Most likely, this is caused by the old typings that should be updated in the DefinitelyTyped project https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mapbox__mapbox-gl-draw
I submitted a PR a few days ago to update types as per v 1.4. It’s waiting for the owners to review it.
You can still access the constants
in latest release via the MapboxDraw
import eg:
import MapboxDraw from '@mapbox/mapbox-gl-draw';
console.log(MapboxDraw.constants.modes);
outputs:
{
DRAW_LINE_STRING: 'draw_line_string',
DRAW_POLYGON: 'draw_polygon',
DRAW_POINT: 'draw_point',
SIMPLE_SELECT: 'simple_select',
DIRECT_SELECT: 'direct_select',
STATIC: 'static'
}