Hello Community,
I've got a Problem with getting Acces to the Features of a user added Layer...
What is working:
Adding a Layer with the "Add Data"-Widget.
Getting acces to the Layer with
var layers = this.map.getLayersVisibleAtScale(this.map.getScale());console.log(layers);
var layer = this.map.getLayer(layers[0].id);console.log(layer);
Whats not working:
Getting acces to the features of the imported Layer...
I think there should be something like
features = layer.getFeatures();
I asked Google for Answers but it doesnt return usefull results...
Any help?
Best regards!
Solved! Go to Solution.
I found an easy solution:
var layer = this.map.getLayer(this.map.graphicsLayerIds[1])
var feature = layer.graphics[j].geometry;
I found an easy solution:
var layer = this.map.getLayer(this.map.graphicsLayerIds[1])
var feature = layer.graphics[j].geometry;