...what happens if my featurelayer is already in the map because I have already added the entire map service with all the layers I need via "ArcGISDynamicMapServiceLayer"?
My map service has a total of 4 feature layers in it (3 polygon layers and 1 polyline layer). I already added the map service to the map (with all 4 layers of course as they are all in one mxd project which sits within the map service). I added them to the map by defining an "ArcGISDynamicMapServiceLayer" and specifying the URL of the map service.
Now I want to allow a user to interact with the interface and specify how to symbolize one specific feature layer within that map service.The samples that show how to symbolize feature layers (under the category "Renderers") all show how you can take a single layer from an existing map service, render it in a specific way, and then add it to the map. If I was to do this then I would end up having that specific feature layer in the map twice right?
I want to access a specific layer within the map service that has already been added to the map.
Using the map.layerIds property that you suggested only gives me access to the single map service that I have in the map, not the individual feature layers that are contained within that map service.
To get around the duplication, you can hide the layer in your dynamic map service using setVisibleLayers.
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.