Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to delete vertex #37

Closed
andrewharvey opened this issue Jan 23, 2025 · 3 comments
Closed

Unable to delete vertex #37

andrewharvey opened this issue Jan 23, 2025 · 3 comments

Comments

@andrewharvey
Copy link
Contributor

As tested on https://maplibre.org/maplibre-gl-js/docs/examples/mapbox-gl-draw/ after drawing a polygon and selecting a vertex, pressing Backspace does not delete it as expected. For comparison I tested https://docs.mapbox.com/mapbox-gl-js/example/mapbox-gl-draw/ which did work.

@andrewharvey
Copy link
Contributor Author

Sorry now I don't know what I tested since I realised the example at https://maplibre.org/maplibre-gl-js/docs/examples/mapbox-gl-draw/ doesn't actually use this project, it uses the Mapbox one. 😕

@andrewharvey
Copy link
Contributor Author

... ah yep the example isn't going to work because https://github.com/mapbox/mapbox-gl-draw/blob/32c2043343acec122f99491d2661e0a303ab4dc4/src/events.js#L128 checks for "mapboxgl" canvas not "maplibregl". Simply mapbox-gl-draw is not compatible with maplibre-gl. Il'l close this here as it's probably not your issue.

@andrewharvey
Copy link
Contributor Author

... ah yep the example isn't going to work because https://github.com/mapbox/mapbox-gl-draw/blob/32c2043343acec122f99491d2661e0a303ab4dc4/src/events.js#L128 checks for "mapboxgl" canvas not "maplibregl". Simply mapbox-gl-draw is not compatible with maplibre-gl. Il'l close this here as it's probably not your issue.

Looks like mapbox-gl-draw 1.5.0 exposed the canvas class as a constant which we can override. maplibre/maplibre-gl-js#5393

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant