Open emoen opened 11 years ago
Also OpenLayers.Layer.Vector has no source so can be skipped - by replacing if (layer.displayInLayerSwitcher ) { with if (layer.displayInLayerSwitcher && !(layer instanceof OpenLayers.Layer.Vector) ) {
Thanks for the bug report @emoen. Would you be able to provide a pull request?
In Viewer.js - getState - ... if (!source) { throw new Error("Could not find source for layer '" + record.get("name") + "'"); }
should be more verbose if eg. layer is a OpenLayers.Layer.Vector. Replace with something like: throw new Error("Could not find source for record '" + record.get("name") + " and layer" + layer.name + "'");