-
Notifications
You must be signed in to change notification settings - Fork 59
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
Circle with multiple points #14
Comments
I have the same problem, can't draw like demo |
1 similar comment
I have the same problem, can't draw like demo |
Same here :/ |
Can one of you please provide a sample code to help me reproduce the issue? It would be great if its on codesandbox or similar. |
@iamanvesh Sure. Here it is https://codesandbox.io/s/angularjs-wztbf?fontsize=14 |
Ok there seems to be multiple reasons which are causing this bug. First off I'd like to mention that this library only works if you add it as a dependency using yarn/npm and use es6 imports/commonjs to import the objects. I don't know how you've generated the bundle file in the example above. That being said, itseems there's an issue with importing MapboxDraw object while using it with Angular6. I believe #13 is a workaround for the issue (@verbeeckjan correct me if I'm wrong). For the time being, I suggest you guys copy all the files under |
Hi @iamanvesh, thanks for your answer. I used browserify to generate this bundle because I'm using AngularJS, not Angular 2+. But I don't think the MapboxDraw import is the problem here, because when I debug the generated bundle the MapboxDraw object is imported normally. The same for the other imports, they all apears in the bundle. |
@anafreitas I think the problem with your code is here
Two issues that I notice here are
Please use the following code as a reference for initializing the draw object.
FYI @netogildo @mva-markim @iskabin |
Hi @iamanvesh it's working now. Thank you sooooo much for the help. |
After I draw a circle, the feature shows multiple points instead of 4. Also I can't edit because the feature behave like a polygon. What could be wrong?
The text was updated successfully, but these errors were encountered: