Interactive interface for browsing global, full-resolution satellite imagery
Added check for orbital layergroup, daynight and track flags
ZachTRiced95516b2d5c8
diff --git a/web/js/layers/wv.layers.modal.js b/web/js/layers/wv.layers.modal.jsindex 1d2f37b0e..e6750705b 100644--- a/web/js/layers/wv.layers.modal.js+++ b/web/js/layers/wv.layers.modal.js@@ -423,19 +423,34 @@ wv.layers.modal = wv.layers.modal || function(models, ui, config) {$wrapper.append($setting).append($label);- //If this is an orbit track.... put it in the orbit track list- if (layer.title.indexOf("Orbital Track") !== -1) {+ // If this is an orbit track.... put it in the orbit track list+ if (layer.layergroup && layer.layergroup.indexOf("reference_orbits") !== -1) {var orbitTitle;+ if (layer.daynight && layer.track) {+ orbitTitle = wv.util.capitalizeFirstLetter(layer.daynight) + "/" + wv.util.capitalizeFirstLetter(layer.track);+ }++ $label.empty()+ .text(orbitTitle);+ $sourceOrbits.append($wrapper);++ /**+ * @deprecated since version 1.8.0 If the data set is old and doesn't have+ * layergroup's set then we will need to track the layer title to determine+ * if it is a Orbital Track+ */+ } else if (layer.title.indexOf("Orbital Track") !== -1) {+// The following complex if statement is a placeholder// for truncating the layer names, until the rest of// the interface is implemented-if (layer.title.indexOf('(') !== -1) {var regExp = /\(([^)]+)\)/;var matches = regExp.exec(layer.title);orbitTitle = matches[1];}- $label.empty().text(orbitTitle);+ $label.empty()+ .text(orbitTitle);$sourceOrbits.append($wrapper);} else {$sourceSettings.append($wrapper);