Skip to content

Commit

Permalink
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,13 @@
// });
// }
// Add each WMS layer to the map
scope.layers = scope.gnCurrentEdit.layerConfig;
if (scope.gnCurrentEdit.layerConfig == undefined) {
scope.layers = scope.gnCurrentEdit.layerConfig;
} else {
scope.layers = Array.isArray(scope.gnCurrentEdit.layerConfig)
? scope.gnCurrentEdit.layerConfig
: [scope.gnCurrentEdit.layerConfig];
}
angular.forEach(scope.gnCurrentEdit.layerConfig, function (layer) {
scope.map.addLayer(
new ol.layer.Tile({
Expand Down

0 comments on commit 769ade7

Please sign in to comment.