smackyouarh / agsjsTOC4xx

Table of Contents (TOC)/Legend Widget for Arcgis JavaScript API version 4.xx
MIT License
4 stars 1 forks source link

getLegendInfo do not work in ESRI API 4.25 #6

Open caronrob2000 opened 1 year ago

caronrob2000 commented 1 year ago

The function "IdentityManager.checkSignInStatus" is using "otherwise" to catch an error.
"otherwise" is not longer supported, so the code must change as the following:

caronrob2000 commented 1 year ago

IdentityManager.checkSignInStatus(this.rootLayer.url.split('services')[0] + 'services') .then(function (credential) { if (credential) { objectPoint.strTokenKey = credential.token; objectPoint._processInfo(); } else { objectPoint.strTokenKey = undefined; objectPoint._processInfo(); } }) .catch(function (error) { objectPoint._processInfo(); })