Throw an error when trying to add a layer in collection mode.

This commit is contained in:
Antoine Vandecreme 2014-01-11 19:25:27 -05:00
parent cd62ba7eca
commit facccf7b45

View File

@ -1011,6 +1011,9 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
if ( !tileSource ) { if ( !tileSource ) {
throw new Error( "No tile source provided as new layer." ); throw new Error( "No tile source provided as new layer." );
} }
if ( this.collectionMode ) {
throw new Error( "Layers not supported in collection mode." );
}
function raiseAddLayerFailed( event ) { function raiseAddLayerFailed( event ) {
/** /**