esri.config.defaults.io.alwaysUseProxy = true;
_getToken: function(onComplete){ dojo.xhrGet({ url: "code/getToken.jsp?&ref=" + document.location.protocol + "%2F%2F" + document.location.hostname, handleAs: "text", load: function(data){ var jsonData = dojo.fromJson(data); onComplete(jsonData.token); }, error: function(error){ onComplete(error); } }); },
Sounds like a perfect use case for tokens. You don't have to manage the tokens. You could use the proxy page to dynamically generate a token and append it when you create the feature layer. I there some reason you don't wan to go the way of tokens?
did see those, but neither one answered my questions.
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.