angular-ui / ui-leaflet

AngularJS directive to embed an interact with maps managed by Leaflet library
http://angular-ui.github.io/ui-leaflet
Other
315 stars 137 forks source link

Problem at Polygon with holes Validation #256

Open danistrauss opened 8 years ago

danistrauss commented 8 years ago

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.

nmccready commented 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?

danistrauss commented 8 years ago

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

nmccready commented 8 years ago

Ok, I will look at your fiddle in more detail.