I consume ImageServer tiles from a partner's ArcGIS. Sometimes their ArcGIS server goes down or the permissions change after they republish, and it may be an hour or so before they resolve this. The problem is that the public will see the ArcGIS authentication dialog anytime the map is accessed (see screenshot).
Here I create the ImageryTileLayer tlay.
var layerUrl = someArcGISUrl + "/" + year + "/AERIAL_" + year + (year > 2002 ? "_RGB" : "_BW") + "/ImageServer";
var tlay = new ImageryTileLayer({
url: layerUrl,
title: year
});
I don't want the authentication dialog to display. I have not found a way to detect or prevent it. It would be great to have a property that disables showing such dialogs.
Here I check for any errors, but "layerview-create-error" will be hit after the authentication dialog is cancelled.
tlay.when("layerview-create-error", function(event) {
console.info(event);
});
prompt