Lucas, You can not retrieve a sublayer from the map using this or any function, only a whole Map Service.
myDynamicLayer.layerDefinitions = [null, "NAME = 'ABC'", null];
My requirement is to define query on featureclass - 1
Set the URL to the ArcGIS Server REST resource that represents a single layer or table, e.g. http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/5. Note the number "5" at the end of the URL which indicates which specific layer you want to query when querying a map service or a feature service. For an image server, the map service itself is the 'single' layer, so the URL would end with "/MapServer" (without a number).
<esri:ArcGISDynamicMapServiceLayer id="Parcels" url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/BloomfieldHillsMichigan/Parcels/MapServer"/> var arc:ArcGISDynamicMapServiceLayer = map.getLayer("Parcels") as ArcGISDynamicMapServiceLayer();
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.