Some FeatureLayers are added to map. How to retrieve one feature layer from map object? I have tried
map.getLayer(map.layerIds[x]), the object is not FeatureLayer type object.
with the following
you are getting the map layer setting the layer id.
A FeatureLayer is always added to the map.graphicsLayerIds array and not the map.layerIds array. So the code would look like:
Or if you know the exact layer id the you can use the code Panagiotis provided.
Thank you so much for your guidance.
Retrieving data ...