Open its-aazizi opened 1 year ago
import MapboxDraw from "@mapbox/mapbox-gl-draw"; import { CircleMode, DirectMode, DragCircleMode, SimpleSelectMode } from "mapbox-gl-draw-circle"; const draw = new MapboxDraw({ displayControlsDefault: false, defaultMode: "draw_circle", userProperties: true, modes: { ...MapboxDraw.modes, draw_circle: CircleMode, drag_circle: DragCircleMode, direct_select: DirectMode, simple_select: SimpleSelectMode } }); draw.changeMode("draw_circle", { initialRadiusKm: 0.001 });
leads to the following error: TypeError: Cannot read properties of undefined (reading 'changeMode')
Same here
leads to the following error: TypeError: Cannot read properties of undefined (reading 'changeMode')