I'm testing offline fallback funtcionality for an app that loads the init.js script locally. I'm trying to catch the error. This works fine if I initialize using a portalItem with a webMapID, but not if I use the following:
var webMapConfig = {
basemap: "streets",
ground: "world-elevation"
};
map = new WebMap( webMapConfig );
map.load()
.otherwise( function( error ) {
// THIS IS NOT REACHED
console.error('map failed to load');
})
.then(function(){
// THIS IS REACHED
console.log('map loaded');
});
The map is completely failing to load (as expected), but for some reason load doesn't reject in 4.0 and 4.1.
Is this a bug or by design?
Cheers,
Martijn