Select to view content in your preferred language

ArcGISDynamicMapServiceLayer - get description from each sublayer

1169
2
Jump to solution
06-03-2013 10:14 PM
OrenGal
Regular Contributor
Hi,
I didn't find in the API how to retrieve the mxd description from each sub layer (The matching GetAllDetails in the SL API).
I made a workaround and got it directly from SOAP (don't like it).
Am I missing something?
Thanks,
Oren
0 Kudos
1 Solution

Accepted Solutions
VinayBansal
Frequent Contributor
You can get it from rest API

 function getLayerInfo() {         var requestHandle = esri.request({             "url": <MapService_Url> + "/layers",             "content": {                 "f": "json"             },             "callbackParamName": "callback"         });         return requestHandle.then(requestSucceeded, requestFailed);     }      function  requestSucceeded(response, io) {                return response;     }         function  requestFailed (response) {                 return null;     }

View solution in original post

0 Kudos
2 Replies
VinayBansal
Frequent Contributor
You can get it from rest API

 function getLayerInfo() {         var requestHandle = esri.request({             "url": <MapService_Url> + "/layers",             "content": {                 "f": "json"             },             "callbackParamName": "callback"         });         return requestHandle.then(requestSucceeded, requestFailed);     }      function  requestSucceeded(response, io) {                return response;     }         function  requestFailed (response) {                 return null;     }
0 Kudos
OrenGal
Regular Contributor
Thanks,
This is short and quick although I prefer through the API
Oren.
0 Kudos