Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

WV-818: Web mercator now has the correct number of zoom levels

Mike McGann60edd2ae6d97
diff --git a/conf/web/main/matrixSets/GoogleMaps.json b/conf/web/main/matrixSets/GoogleMaps.json
index 6969426b1..0290a74a1 100644
--- a/conf/web/main/matrixSets/GoogleMaps.json
+++ b/conf/web/main/matrixSets/GoogleMaps.json
@@ -12,7 +12,8 @@
4891.9698095703,
2445.9849047851,
1222.9924523925,
- 611.4962261962
+ 611.4962261962,
+ 305.7481131407048
],
"tileSize": [256, 256]
},
@@ -27,7 +28,8 @@
9783.9396191406,
4891.9698095703,
2445.9849047851,
- 1222.9924523925
+ 1222.9924523925,
+ 611.4962261962
],
"tileSize": [256, 256]
},
@@ -41,7 +43,8 @@
19567.8792382812,
9783.9396191406,
4891.9698095703,
- 2445.9849047851
+ 2445.9849047851,
+ 1222.9924523925
],
"tileSize": [256, 256]
},
@@ -54,7 +57,8 @@
39135.7584765625,
19567.8792382812,
9783.9396191406,
- 4891.9698095703
+ 4891.9698095703,
+ 2445.9849047851
],
"tileSize": [256, 256]
}
diff --git a/conf/web/main/projections/webmerc.json b/conf/web/main/projections/webmerc.json
index a27a37e2c..305c7c5b6 100644
--- a/conf/web/main/projections/webmerc.json
+++ b/conf/web/main/projections/webmerc.json
@@ -20,9 +20,10 @@
4891.9698095703,
2445.9849047851,
1222.9924523925,
- 611.4962261962
+ 611.4962261962,
+ 305.7481131407048
],
- "numZoomLevels": 9,
+ "numZoomLevels": 10,
"startCenter": [
0,
0
diff --git a/src/js/proj/wv.proj.ui.js b/src/js/proj/wv.proj.ui.js
index 7b598d1d3..3dd31ed57 100644
--- a/src/js/proj/wv.proj.ui.js
+++ b/src/js/proj/wv.proj.ui.js
@@ -20,7 +20,7 @@ wv.proj = wv.proj || {};
*
* @class wv.proj.ui
*/
-wv.proj.ui = wv.proj.ui || function(models) {
+wv.proj.ui = wv.proj.ui || function(models, config) {
var model = models.proj;
@@ -54,15 +54,21 @@ wv.proj.ui = wv.proj.ui || function(models) {
var $menuItems = $("<ul></ul>");
var $arctic = $("<li><a><i class='ui-icon icon-large fa fa-arrow-circle-up fa-fw'></i>Arctic</a></li>");
- var $geographic = $("<li><a><i class='ui-icon icon-large fa fa-circle fa-fw'></i>Geographic</a></li>");
- var $antarctic = $("<li><a><i class='ui-icon icon-large fa fa-arrow-circle-down fa-fw'></i>Antarctic</a></li>");
-
$menuItems.append($arctic);
- $menuItems.append($geographic);
- $menuItems.append($antarctic);
-
$arctic.click(function() { models.proj.select("arctic"); });
+
+ var $geographic = $("<li><a><i class='ui-icon icon-large fa fa-circle fa-fw'></i>Geographic</a></li>");
+ $menuItems.append($geographic);
$geographic.click(function() { models.proj.select("geographic"); });
+
+ if ( config.parameters.webmerc ) {
+ var $webmerc = $("<li><a><i class='ui-icon icon-large fa fa-square fa-fw'></i>Mercator</a></li>");
+ $menuItems.append($webmerc);
+ $webmerc.click(function() { models.proj.select("webmerc"); });
+ }
+
+ var $antarctic = $("<li><a><i class='ui-icon icon-large fa fa-arrow-circle-down fa-fw'></i>Antarctic</a></li>");
+ $menuItems.append($antarctic);
$antarctic.click(function() { models.proj.select("antarctic"); });
$menu.append($menuItems);
diff --git a/src/js/wv.main.js b/src/js/wv.main.js
index e94e56a80..848163705 100644
--- a/src/js/wv.main.js
+++ b/src/js/wv.main.js
@@ -109,7 +109,7 @@ $(function() {
// Create widgets
var ui = {};
- ui.proj = wv.proj.ui(models);
+ ui.proj = wv.proj.ui(models, config);
ui.sidebar = wv.layers.sidebar(models);
ui.activeLayers = wv.layers.active(models, ui, config);
ui.addLayers = wv.layers.add(models, ui, config);