Interactive interface for browsing global, full-resolution satellite imagery
Don't perform the vectorData from config if not defined in layer json
ZachTRice86321b4861a3
diff --git a/tasks/validateOptions.py b/tasks/validateOptions.pyindex cbf89be06..69bf75f34 100755--- a/tasks/validateOptions.py+++ b/tasks/validateOptions.py@@ -108,14 +108,6 @@ for layer_id in wv["layers"].keys():vector_style_id + ".json")):error("[%s] Unknown vector style: %s" % (layer_id, vector_style_id))del layer["vectorStyle"]- if "vectorData" in layer and "id" not in layer["vectorData"]:- error("[%s] No vectorData definition" % (layer_id))- elif "vectorData" in layer:- vector_data_id = layer["vectorData"]["id"]- if not os.path.exists(os.path.join(config_dir, "vectordata",- vector_data_id + ".json")):- error("[%s] Unknown vector data: %s" % (layer_id, vector_data_id))- del layer["vectorData"]if "group" not in layer and opt.get("warnOnUnexpectedLayer"):error("[%s] Possible unexpected layer, no group defined" % layer_id)remove_layer(wv, layer_id)diff --git a/web/js/map/ui.js b/web/js/map/ui.jsindex 2f2ca130b..69a7ca52a 100644--- a/web/js/map/ui.js+++ b/web/js/map/ui.js@@ -919,8 +919,9 @@ export function mapui(models, config, store, ui) {var feats = feature.getProperties();attsCollector.push(feats);if (layer.wv.def.vectorData && layer.wv.def.vectorData.id) {+ let vectorDataId = layer.wv.def.vectorData.id;// var errorMessage = '<p>There was an error loading vector metadata.</p>';- var data = 'config/vectordata/' + layer.wv.def.vectorData.id + '.json';+ var data = config.vectorData[vectorDataId];console.log(data);}});