Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

WV-879: Readded EPSG codes for coordinate display

Mike McGanndfa47b4671c3
diff --git a/src/js/events.js b/src/js/events.js
index 5aef6234b..bc8c4ead8 100644
--- a/src/js/events.js
+++ b/src/js/events.js
@@ -553,5 +553,3 @@ SOTE.widget.Events.prototype.getStatus = function(){
};
SOTE.widget.Events.prototype.getValue = function() {};
-
-
diff --git a/src/js/layers/wv.layers.model.js b/src/js/layers/wv.layers.model.js
index f0f762bc6..48343f4fc 100644
--- a/src/js/layers/wv.layers.model.js
+++ b/src/js/layers/wv.layers.model.js
@@ -176,6 +176,8 @@ wv.layers.model = wv.layers.model || function(models, config) {
}
var oldDef = self.active[index];
var newDef = config.layers[idNew];
+ newDef.visible = true;
+ newDef.opacity = 1.0;
self.active[index] = newDef;
self.events.trigger("update");
self.events.trigger("change");
diff --git a/src/js/map/wv.map.ui.js b/src/js/map/wv.map.ui.js
index 5722ad2e5..fc6f7ce6e 100644
--- a/src/js/map/wv.map.ui.js
+++ b/src/js/map/wv.map.ui.js
@@ -417,7 +417,10 @@ wv.map.ui = wv.map.ui || function(models, config) {
formatOutput: function(mouseXY) {
var mouseLonLat = mouseXY.transform(proj.crs, "EPSG:4326");
return mouseLonLat.lon.toFixed(3) + "°, " +
- mouseLonLat.lat.toFixed(3) + "°";
+ mouseLonLat.lat.toFixed(3) + "° " +
+ // FIXME: Change back to projection model after
+ // arctic has been backfilled
+ models.proj.change.crs;
}
});
controls.push(coordinateControl);
@@ -463,7 +466,7 @@ wv.map.ui = wv.map.ui || function(models, config) {
$zoomOut.click(function() {
map.zoomOut();
});
-
+
map.addLayer(createLayerBlank(proj));
if ( models.proj.selected.id === proj.id && models.map.extent ) {
diff --git a/src/js/proj/wv.proj.change.js b/src/js/proj/wv.proj.change.js
index 97119c516..7765d7c74 100644
--- a/src/js/proj/wv.proj.change.js
+++ b/src/js/proj/wv.proj.change.js
@@ -70,15 +70,15 @@ wv.proj.change = wv.proj.change || function(models) {
}
if ( wasOld !== self.old && self.old ) {
- models.layers.replace("arctic_coastlines_3413",
+ models.layers.replace("Coastlines",
"arctic_coastlines");
- models.layers.replace("arctic_graticule_3413",
+ models.layers.replace("Graticule",
"arctic_graticule");
} else if ( wasOld !== self.old && !self.old ) {
models.layers.replace("arctic_coastlines",
- "arctic_coastlines_3413");
+ "Coastlines");
models.layers.replace("arctic_graticule",
- "arctic_graticule_3413");
+ "Graticule");
}
};
diff --git a/src/js/wv.brand.js b/src/js/wv.brand.js
index f1eb48eb5..ac144e6eb 100644
--- a/src/js/wv.brand.js
+++ b/src/js/wv.brand.js
@@ -82,4 +82,3 @@ wv.brand = wv.brand || (function() {
return self;
})();
-
diff --git a/test/proj/wv.proj.change-test.js b/test/proj/wv.proj.change-test.js
index 2b6cd3758..67d6ef813 100644
--- a/test/proj/wv.proj.change-test.js
+++ b/test/proj/wv.proj.change-test.js
@@ -169,9 +169,9 @@ buster.testCase("wv.proj.change", {
this.models.proj.select("arctic");
this.models.date.select(new Date(Date.UTC(2013, 0, 1)));
buster.assert.calledWith(this.replace,
- "arctic_coastlines_3413", "arctic_coastlines");
+ "Coastlines", "arctic_coastlines");
buster.assert.calledWith(this.replace,
- "arctic_graticule_3413", "arctic_graticule");
+ "Graticule", "arctic_graticule");
},
"Change from old to new switches layers": function() {
@@ -180,10 +180,9 @@ buster.testCase("wv.proj.change", {
var model = wv.proj.change(this.models);
this.models.date.select(new Date(Date.UTC(2014, 0, 1)));
buster.assert.calledWith(this.replace,
- "arctic_coastlines", "arctic_coastlines_3413");
+ "arctic_coastlines", "Coastlines");
buster.assert.calledWith(this.replace,
- "arctic_graticule", "arctic_graticule_3413");
+ "arctic_graticule", "Graticule");
}
});
-