Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Removed depreciated addDescriptions method

ZachTRicee3c6ba40dc88
diff --git a/web/js/layers/wv.layers.model.js b/web/js/layers/wv.layers.model.js
index 26b0df352..0bd13389f 100644
--- a/web/js/layers/wv.layers.model.js
+++ b/web/js/layers/wv.layers.model.js
@@ -22,7 +22,6 @@ wv.layers.model = wv.layers.model || function(models, config) {
self.reset = function() {
self.clear();
- self.addDescriptions();
if (config.defaults && config.defaults.startingLayers) {
_.each(config.defaults.startingLayers, function(start) {
self.add(start.id, start);
@@ -30,62 +29,6 @@ wv.layers.model = wv.layers.model || function(models, config) {
}
};
-
- /**
- * Map source descriptions to the layer objects based on their measurement relationship.
- * There is a special check for Orbit Tracks since these layers are attached
- * to sources in multiple measurment files.
- * @deprecated since version 1.8.0 - Add a description flag to individual layer option files
- *
- * @return {type}
- */
- self.addDescriptions = function() {
- var thisSetting;
- var description;
- _.each(config.measurements, function(measurement, measurementKey) {
- if(measurementKey == "Orbital Track") {
- _.each(measurement.sources, function(source, sourceKey) {
- _.each(source.settings, function(setting, settingKey) {
- thisSetting = setting;
- description = source.description;
- _.each(config.layers, function(layer, layerKey) {
- // If a layer is an orbit track
- if (layer.layergroup && layer.layergroup.indexOf("reference_orbits") !== -1) {
- // Set the description
- if (layer.id == thisSetting) {
- // If there has not been a layer description set in the file, then set it based on measurement description.
- if(!layer.description) {
- layer.description = description || "";
- }
- }
- }
- });
- });
- });
- } else {
- _.each(measurement.sources, function(source, sourceKey) {
- _.each(source.settings, function(setting, settingKey) {
- thisSetting = setting;
- description = source.description;
- _.each(config.layers, function(layer, layerKey) {
- if (layer.layergroup && layer.layergroup.indexOf("reference_orbits") !== -1) {
- // Do nothing
- } else {
- // If a layer is not an orbit track
- if (layer.id == thisSetting) {
- // If there has not been a layer description set in the file, then set it based on measurement description.
- if(!layer.description) {
- layer.description = description || "";
- }
- }
- }
- });
- });
- });
- }
- });
- };
-
self.get = function(spec) {
spec = spec || {};
var baselayers = forGroup("baselayers", spec);