Open v1r0x opened 7 years ago
I think the layers directive doesn't support geoJson layers. If you want to have multiple geo-json layers, you need to add the attribute geojson-nested="true"
to your angular directive.
And then, you'll need to add a new property/key on your geojson object, with each geoJson layer. So, instead of having this:
map.map.layers.overlays[elem.id] = currentLayer;
You'll end up with something like this:
map.map.geojson[elem.name] = currentLayer;
I'm very happy with ui-leaflet, but now I'm stuck. I had all my geojson data in an object which looked like this:
The data gets loaded in the background and is then pushed to
map.map.geojson.data.features
. Themap.map.geojson
is passed to the leaflet directive<leaflet geojson="map.geojson"></leaflet>
. Now I want to split the data into different geojson layers. Therefore I get a list with different element groups which are my different layers. I set up these layers as so:But I don't see anything on my map.
onEachFeature
doesn't get called. I couldn't find any tutorial or code on how to update a layer of typegeoJSONShape
. Is this even possible? Did I miss something?regards v1r0x