Open piranna opened 6 months ago
Yeah, it's a known limitation. Let me check if there is a way to improve this.
@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:
What do you think it should look like?
Points should be always inside the shadowed región.
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.
When crossing one of the poles, an uncovered region is set on the pole:
Similarly, if the radious is too big, it does the coverage on the "small circle":
If I would bet, I think problem is related to the polygon connecting the circle dots over the shorter route.