var serverInfo = new ServerInfo();
serverInfo.server = "https://wl.arcgisonline.cn/server/rest/services";
serverInfo.tokenServiceUrl = "https://wl.arcgisonline.cn/portal/sharing/rest/generateToken";
var userInfo = {username:"***",password:"***"};
IdentityManager.generateToken(serverInfo,userInfo).then(function(data){
var tokenValue = data.token; IdentityManager.registerToken({server:"https://wl.arcgisonline.cn/server/rest/services",token:tokenValue});
},function(error){
console.error(error);
});
var layer = new MapImageLayer({url: "https://wl.arcgisonline.cn/server/rest/services/wl/time1/MapServer"});
map.add(layer);
The token used to access SceneLayer comes from IdentityManager.registerToken.
My question is, when accessing the SceneLayer data, must the url be consistent with the server in IdentityManager.registerToken? Can I use the following methods (must bring the token)
var layer = new MapImageLayer({url: "https://172.16.8.11:8080/server/rest/services/wl/time1/MapServer"});
Can the url of the layer be different from the server address in IdentityManager.registerToken? Token required