Hello,
I have one issue in code which I could not figure out. I'm making esriRequest function. Code details:
var req = EsriRequest({ url: lyrIdUrl, content: { f: "json" }, handleAs: "json", callbackParamName: "" },
{ usePost: true });
req.then(function (response) {
debugger;
geotypeJson = response;
alert("Succeess");
}, function (error) {
console.log(error.message);
alert("ID Error");
});
debugger;
For some reason code followed by req.then executes first before what's code inside req.then (I added debugger to confirm this). Can someone help me understand why? Also, can someone help me fix it, please? I want to assign geotypeJson to response from lyrIdUrl.
Meghan Kulkarni#