ui-leaflet icon indicating copy to clipboard operation
ui-leaflet copied to clipboard

Markers in a sub array

Open sylvainar opened this issue 7 years ago • 2 comments

Hey guys !

So I've got some monuments in an array and I'd like to display them on a map. My data look like this :

monuments:[{ Name:"stuff", ... Marker:{ Lat: 50, Lon:3 }}]

How can I easily loops on the marker in this array? Do I need to duplicate it to create an array looking like the ones in the documentation or is it possible to get the data in the sub array we're looping on ?

Thanks !

sylvainar avatar Nov 18 '16 19:11 sylvainar

Hi sylvainar,

I try to solve same problem. Did you solve it? Thanks

ivanisko avatar Aug 21 '17 11:08 ivanisko

Nop, I ended up doing something like : monuments:[{ Custom_name:"stuff", Lat: 50, Lon:3 }, ...] With prefix to be sure that the attribute isn't used by leaflet.

sylvainar avatar Aug 21 '17 11:08 sylvainar