Reputation: 8942
Is there a way to render overlapping polygons without holes in multipolygon in Leaflet?
I found Leaflet has an open issue.
I am asking because I have a bound polygon that contains inner polygons.
I would need to drag them all together, but it doesn't work in canvas mode. It could work if I can render this as a multipolygon. This is a follow-up question on my previous question.
Upvotes: 2
Views: 532
Reputation: 19069
I'll just copy-paste my response to Leaflet bug #6173 :
I'm reading the OGC's Simple Feature Access specification (again), to remind myself about the formal definitions of Polygons and MultiPolygons. Let me quote page 31:
6.1.14 MultiPolygon
A MultiPolygon is a MultiSurface whose elements are Polygons.
The assertions for MultiPolygons are as follows.
a) The interiors of 2 Polygons that are elements of a MultiPolygon may not intersect.
Heck, it even comes with pretty pictures:
So, MultiPolygons which have overlapping members are not valid MultiPolygons. As such, I think Leaflet has no obligation to handle that invalid case.
See also #3763 (comment) (re: fillRule
option for SVG renderer).
Upvotes: 3