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

Couple of bugs for big radious crossing the poles #106

Open
piranna opened this issue Mar 27, 2024 · 4 comments
Open

Couple of bugs for big radious crossing the poles #106

piranna opened this issue Mar 27, 2024 · 4 comments

Comments

@piranna
Copy link

piranna commented Mar 27, 2024

When crossing one of the poles, an uncovered region is set on the pole:

Captura de pantalla -2024-03-27 21-57-38

Similarly, if the radious is too big, it does the coverage on the "small circle":

Captura de pantalla -2024-03-27 21-57-47

If I would bet, I think problem is related to the polygon connecting the circle dots over the shorter route.

@henrythasler
Copy link
Owner

Yeah, it's a known limitation. Let me check if there is a way to improve this.

@henrythasler
Copy link
Owner

@piranna: After playing around for a while, I couldn't even tell what it's supposed to look like in these cases. Either it's not filled correctly (as in your example) or additional points need to be added but then it's not a circle any more. There's also another weird scenario that would need to be covered:
image

What do you think it should look like?

@piranna
Copy link
Author

piranna commented Apr 3, 2024

Points should be always inside the shadowed región.

@henrythasler
Copy link
Owner

After some research I conclude that the current implementation for circles, which is a simple extension of leaflet's polyline, can't be tweaked to handle such (edge) cases gracefully. I will probably need two separate polygons to achieve the desired results. One for the circle boundary and another, different one to "floodfill" the area inside the geodesic circle with respect to the map border. And that doesn't even include a layer with noWrap=false...
So, for now you need to avoid filling circles near the poles or very large ones. I will nevertheless continue to look into the problem whenever I find the time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants