From facccf7b455362b22b62f844bc5e2b20b01fe922 Mon Sep 17 00:00:00 2001 From: Antoine Vandecreme Date: Sat, 11 Jan 2014 19:25:27 -0500 Subject: [PATCH] Throw an error when trying to add a layer in collection mode. --- src/viewer.js | 3 +++ 1 file changed, 3 insertions(+) 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 ) { /**