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

how to make it work mapbox gl-draw #34

Open
Aliber009 opened this issue Apr 6, 2021 · 1 comment
Open

how to make it work mapbox gl-draw #34

Aliber009 opened this issue Apr 6, 2021 · 1 comment

Comments

@Aliber009
Copy link

I have implemented, circlet modes into my mapboxDraw, and I have created a button to call the circle Draw function , but I dont know how to that , what function should I put when "onClick()"
any help please

@owolfy
Copy link

owolfy commented Jun 16, 2021

Make sure that you:

  1. Added draw to map (map.addControl(draw))
  2. Added map draw listeners, draw.create and draw.update
  3. Created a button which calls to
    createCircle() {
    draw.changeMode('draw_circle', { initialRadiusInKm: 0.5 });
    }

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

2 participants