I have the following code that shows a MapImageLayer. After the last line is called, document.body.style.cursor = "default"; there is a lag time of 20 seconds before the layer is actually visible on the map.
Since the cursor is set back to default, the user is thinking the process is over and the layer should be there. I would like to set the cursor back to default when the layer is actually shown on the map. How do I get that?
function OnAppliedMarketsSuccess(response, userContext, methodName) {
var geographies = response.toString();
var marketLayer = appliedMarketLayer.findSublayerById(0);
marketLayer.definitionExpression = "ID_ in (" + geographies + ")";
marketLayer.visible = true;
document.body.style.cursor = "default";
}
Solved! Go to Solution.
I've found Rene Rubalcava's blog pretty helpful on the new way of finding out when things are ready:
https://odoe.net/blog/quick-tip-arcgis-api-4-js-stuff-ready/
I've found Rene Rubalcava's blog pretty helpful on the new way of finding out when things are ready:
https://odoe.net/blog/quick-tip-arcgis-api-4-js-stuff-ready/
Thank you. That did it.