Hi,
I am getting the ArcGIS token from a custom REST service. Now i need to use the token to add the layer to the map. I am unable to set the credential property. Can anyone tell me how to set the token to the layer at runtime with out using Identity Manager.
Regards,
Ravi.
U can use the token at the end of the url like
var token ="asdasdasdasd";
"MapServer?f=json&token= " + token;
Also i think i have seen a property in some layer (dont remember if featured or dynamic) to add the token via property, like: .... token: mytoken, ...
Hello Ravi,
Create an object of class "Credential" and pass it to your layer. You can assign the custom service URL to generate a token to its property "server". For more information please check reference of Credential class.