You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 20, 2019. It is now read-only.
The data gets loaded in the background and is then pushed to map.map.geojson.data.features.
The map.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 type geoJSONShape. Is this even possible? Did I miss something?
regards
v1r0x
The text was updated successfully, but these errors were encountered:
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;
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
.The
map.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
The text was updated successfully, but these errors were encountered: