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

Full circle with semiCircle #21

Open
tecnocoma75 opened this issue Jul 9, 2017 · 2 comments
Open

Full circle with semiCircle #21

tecnocoma75 opened this issue Jul 9, 2017 · 2 comments

Comments

@tecnocoma75
Copy link

Sorry for reopening the ticket...it seems like also v2.0.0.0 can't make full circle using setdirection mode, or ami i wrong?
I modified your fullcircle demo and replaced code with:

L.semiCircle(latlng, {
radius: radius,
fill: true,
fillColor:'#a1ba03',
fillOpacity: 0.5,
color: '#a1ba03',
opacity: 0.5
}).setDirection(0,360).addTo(map);

The problem is the same: a vertical line.

@jieter
Copy link
Owner

jieter commented Jul 11, 2017

Why are you not just calling L.circle(latlng, {...})?

You can improve this check: https://github.com/jieter/Leaflet-semicircle/blob/master/Semicircle.js to make L.semiCircle render a circle in your case, please open a PR.

@tecnocoma75
Copy link
Author

Ok i will use Circle. The problem is that i have to map various object (arc and circle)imported from Json, and so i needed a unique function to render both Circle and Arcs . If it's not possible i will use a IF-CONDITION on parameter DEGREE and for 360° use CIRCLE instead of Semicircle. Probably semicircle.js should be updated to handle a degree of 360..infact if i use a 359,999 value, the circle is good...but i don't like the solution...: will open a PR.

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