Hello,
I have created a function in a customized widget named as "Requestdata" where it requests the data from the soe url and returns a response as shown below.
Requestdata :function(){
var LL = "Soe url";
var list = esriRequest({
url: LL,
content: { f: "json" },
handleAs: "json",
callbackParamName: "callback",
timeOut:0,
},{useProxy:true});
list.then(
function(response) {
var features = response;
this.Newfunction();------------------------------>(Having an issue in calling this function)
},
function(error) {
console.log("Error: ");
}
);
When I call a function named as "this.Newfunction" in the response function, it does not work. Also, the widget executes all other functions in the widget and then makes the request at last even though i request it it at the starting point.