chore: export constants and lib through MapboxDraw
Overview
- Saw there was an issue for exposing API's to make it easier to write custom draw modes - https://github.com/mapbox/mapbox-gl-draw/issues/1056
- Experiencing a similar issue here - https://github.com/aws-amplify/maplibre-gl-draw-circle
- Added everything in
ConstantsandLibto theMapboxDrawdefault export- Considered making them separate named exports from the default but wanted to keep it in line with
modeswhich is also added directly onto theMapboxDrawobject
- Considered making them separate named exports from the default but wanted to keep it in line with
This is blocking us from updating to the latest version of mapbox-gl-draw and would be great to get feedback from the Mapbox team if this is something that can move forward. We import these utilities specifically in our libraries in order to draw circular geofences efficiently.
@mourner are you able to look at this (or point to another maintainer, assuming that this is still maintained)?
Any update on getting this PR reviewed by the maintainers?
Awesome, is there any reason why the "mouseEventPoint" function was not exported from the lib? I'm using it in a custom mode.
https://github.com/mapbox/mapbox-gl-draw/blob/main/src/lib/mouse_event_point.js
Hey everyone! I'm sorry for not getting back to you sooner. This change looks good to me 👍
please sync update the @types/mapbox__mapbox-gl-draw packages (npmjs.com),otherwise to use MapboxDraw.lib will report errors.