documentInfo Title?

649
3
Jump to solution
10-10-2012 07:24 AM
JoanneMcGraw
Occasional Contributor III
I can see the server's JSON response when an esri.layers.ArcGISDynamicMapServiceLayer is instantiated contains the documentInfo.Title stored with the service. Is this information available from the ArcGISDynamicMapServiceLayer object?

I've looked and haven't found anything that looks remotely useful for this except the getResourceInfo method which doesn't seem to be documented in that class or any of the classes it inherits from. Besides that though, I assume, since this information was already retrieved from the server when the ArcGISDynamicMapServiceLayer object was created that it must already be in there somewhere...I'm just looking in the wrong places.

Can someone point me in the right direction, please?

Cheers,
jtm
0 Kudos
1 Solution

Accepted Solutions
BillDaigle
Occasional Contributor III
I don't think you'll find this property from as part of the ArcGISDynamicMapServiceLayer object.  If you want to access this in your application, you could always do a call to you rest services directory:
 
//function call for fetching a rest Services Page. This will return a dojo.deferred var fetchRestServicesPage = function (path){   return dojo.io.script.get({       url: url,       callbackParamName: "callback"   }); };   //sample usage var serviceInfoCall = fetchPage("http://services.arcgisonline.com/ArcGIS/rest/services/Specialty/Soil_Survey_Map/MapServer");  //wait for a response before proceeding               serviceInfoCall.then(function(serviceInfo){   var documentTitle = serviceInfo.documentInfo.Title;      //do what you want with the title here    )}; 

View solution in original post

0 Kudos
3 Replies
BillDaigle
Occasional Contributor III
I don't think you'll find this property from as part of the ArcGISDynamicMapServiceLayer object.  If you want to access this in your application, you could always do a call to you rest services directory:
 
//function call for fetching a rest Services Page. This will return a dojo.deferred var fetchRestServicesPage = function (path){   return dojo.io.script.get({       url: url,       callbackParamName: "callback"   }); };   //sample usage var serviceInfoCall = fetchPage("http://services.arcgisonline.com/ArcGIS/rest/services/Specialty/Soil_Survey_Map/MapServer");  //wait for a response before proceeding               serviceInfoCall.then(function(serviceInfo){   var documentTitle = serviceInfo.documentInfo.Title;      //do what you want with the title here    )}; 
0 Kudos
JoanneMcGraw
Occasional Contributor III
bdaigle,

Thank you for your response. Given what I was seeing, I figured I'd have to make a separate request myself but was hoping I wouldn't.

Cheers,
jtm
0 Kudos
DávidGregor
New Contributor II

I was trying to build this into PrintPlus custom widget without any succes. I have a webapp where you can reach several map services, what are seeded from different MXD-s with appropriate metadata (title, author ect.). Right now, i can only set the config file to fill the titleblock. Do you have any solution for this? It would be a really good feature.

0 Kudos