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

In areas close to the poles, the semi-circle becomes huge #12

Open
JoeMatulka opened this issue Dec 5, 2016 · 4 comments
Open

In areas close to the poles, the semi-circle becomes huge #12

JoeMatulka opened this issue Dec 5, 2016 · 4 comments

Comments

@JoeMatulka
Copy link

In areas with coordinates like:
77N, 70W
The circle object itself behaves fine, but when I use the set Direction function on the circle; it becomes huge.

This is only in issue in areas close to the poles.

My code is pretty straight forward:

                if (stopAngle < startAngle) {
                    stopAngle += 360;
                }

                var arc = stopAngle - startAngle;
                var direction = (arc) / 2 + startAngle;

                circle.setDirection(direction, arc);
@jieter
Copy link
Owner

jieter commented Dec 6, 2016

Hey @JoeMatulka, thanks for the issue report.
Bigger than normal circles?
A fiddle describing your problem would be helpful, as your example code is not clearly showing the problem to me.

@jieter
Copy link
Owner

jieter commented Dec 6, 2016

This example has a semicircle at 77N (zoom out a bit), it looks like I would expect.

@JoeMatulka
Copy link
Author

JoeMatulka commented Dec 7, 2016

What version of leaflet is that example using?

I should have mentioned I'm using 1.0.1

circles-semi-1
circles-semi-2

Those screens are the same circle, one just has the direction set with the code above.

This might be a version issue? Because Leaflet 1.x made circles more elliptical, possibly?

I should also mention, thank you for your work on this library. Very simple to use and clean 😃

@JoeMatulka
Copy link
Author

Sorry about accidentally closing this issue, I believe that maybe this isn't an issue with the version of leaflet. But the projection of the map, I am using L.CRS.EPSG4326 which gives more of an elliptical view.

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