Open danistrauss opened 8 years ago
Your problem seems to be leaflet related. Basically your working with raw leaflet to create the polygon (which we are not messing with). So it would seem you should debug/check with leaflet. Also, does this work without ui-leaflet in an example?
Yes Polygon with holes works in leaflet but not in ui-leaflet. The problem seems not leaflet related to me. Because the coordinates object works with default leaflet polygon creation but it doesn't pass ui-leaflets polygon validation -> angular.js:9159 [AngularJS - Leaflet] Invalid data passed to the polygon path
Ok, I will look at your fiddle in more detail.
In Leaflet documentation for Polygon they say " You can also create a polygon with holes by passing an array of arrays of latlngs". When i try doing this with ui leaflet i get the "Invalid data passed to the polygon path" Error. I created a fiddle where you can add the polygon with holes via ui-leaflet(error) and via leaflet. I use version 1.0.0.