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

Click a button to draw without using toolbar #859

Open
tenznhok opened this issue Apr 25, 2018 · 3 comments
Open

Click a button to draw without using toolbar #859

tenznhok opened this issue Apr 25, 2018 · 3 comments

Comments

@tenznhok
Copy link

Hi. Is there a way that I can use a created outside of the map to draw instead of using drawing toolbar?
If I want to draw a rectangle, how can i call the function after clicking the button?

@zhengtan2003
Copy link

let polygon = new L.Draw.Polygon(this.map, {repeatMode: false});

polygon.addHooks();

@malishahi
Copy link

Hi,

What does this code do?
thanks

@rgautier2003
Copy link

if one was to use the tag what is the syntax for attaching to the map that way? Thanks

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

4 participants