diff --git a/src/viewer.js b/src/viewer.js index 6d57d945..bc40160a 100644 --- a/src/viewer.js +++ b/src/viewer.js @@ -1011,6 +1011,9 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype, if ( !tileSource ) { 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 ) { /**