From 5761b91e3f460c5f7cf4f89a3f00df24c8db3cf2 Mon Sep 17 00:00:00 2001 From: afabiani Date: Sat, 7 Jul 2018 16:27:13 +0200 Subject: [PATCH] - Fix max zoom issue --- .../client/templates/geoext/layers/layer_geoext_map.html | 7 ++++--- .../templates/geoext/layers/layer_geoext_map_mini.html | 3 ++- geonode/client/templates/geoext/maps/map_geoexplorer.js | 9 +++++---- .../templates/geoext/maps/map_geoexplorer_viewer.js | 3 ++- geonode/client/templates/geoext/maps/map_include.html | 3 ++- 5 files changed, 15 insertions(+), 10 deletions(-) diff --git a/geonode/client/templates/geoext/layers/layer_geoext_map.html b/geonode/client/templates/geoext/layers/layer_geoext_map.html index 6dc651a6017..000b0dc1c2c 100644 --- a/geonode/client/templates/geoext/layers/layer_geoext_map.html +++ b/geonode/client/templates/geoext/layers/layer_geoext_map.html @@ -57,7 +57,8 @@ 305.74811309814453, 152.87405654907226, 76.43702827453613, 38.218514137268066, 19.109257068634033, 9.554628534317017, 4.777314267158508, 2.388657133579254, 1.194328566789627, - 0.5971642833948135, 0.25, 0.1, 0.05]; + 0.5971642833948135, 0.2985821416974067, 0.1492910708487033, + 0.0746455354243516]; } app.mapPanel.map.getServerResolutions = function() { return [156543.03390625, 78271.516953125, 39135.7584765625, @@ -74,13 +75,13 @@ return 156543.0339 * 2; } app.mapPanel.map.getNumZoomLevels = function() { - return 28; + return 30; } app.mapPanel.map.getMinZoom = function() { return 0; } app.mapPanel.map.getMaxZoom = function() { - return 28; + return 30; } app.mapPanel.map.getResolutionForZoom = function(zoom) { zoom = Math.max(0, Math.min(zoom, this.getResolutions().length - 1)); diff --git a/geonode/client/templates/geoext/layers/layer_geoext_map_mini.html b/geonode/client/templates/geoext/layers/layer_geoext_map_mini.html index 4503d820f9f..18036496663 100644 --- a/geonode/client/templates/geoext/layers/layer_geoext_map_mini.html +++ b/geonode/client/templates/geoext/layers/layer_geoext_map_mini.html @@ -51,7 +51,8 @@ 305.74811309814453, 152.87405654907226, 76.43702827453613, 38.218514137268066, 19.109257068634033, 9.554628534317017, 4.777314267158508, 2.388657133579254, 1.194328566789627, - 0.5971642833948135, 0.25, 0.1, 0.05]; + 0.5971642833948135, 0.2985821416974067, 0.1492910708487033, + 0.0746455354243516]; } app.mapPanel.map.getServerResolutions = function() { return [156543.03390625, 78271.516953125, 39135.7584765625, diff --git a/geonode/client/templates/geoext/maps/map_geoexplorer.js b/geonode/client/templates/geoext/maps/map_geoexplorer.js index 1f66a5c29a9..c07c6cb17bd 100644 --- a/geonode/client/templates/geoext/maps/map_geoexplorer.js +++ b/geonode/client/templates/geoext/maps/map_geoexplorer.js @@ -50,7 +50,8 @@ Ext.onReady(function() { 305.74811309814453, 152.87405654907226, 76.43702827453613, 38.218514137268066, 19.109257068634033, 9.554628534317017, 4.777314267158508, 2.388657133579254, 1.194328566789627, - 0.5971642833948135, 0.25, 0.1, 0.05]; + 0.5971642833948135, 0.2985821416974067, 0.1492910708487033, + 0.0746455354243516]; } app.mapPanel.map.getServerResolutions = function() { return [156543.03390625, 78271.516953125, 39135.7584765625, @@ -67,13 +68,13 @@ Ext.onReady(function() { return 156543.0339 * 2; } app.mapPanel.map.getNumZoomLevels = function() { - return 28; + return 30; } app.mapPanel.map.getMinZoom = function() { return 0; } app.mapPanel.map.getMaxZoom = function() { - return 28; + return 30; } app.mapPanel.map.getResolutionForZoom = function(zoom) { zoom = Math.max(0, Math.min(zoom, this.getResolutions().length - 1)); @@ -90,7 +91,7 @@ Ext.onReady(function() { return resolution; } app.mapPanel.map.adjustZoom = function(zoom) { - var maxResolution = 156543.0339 * 4; + var maxResolution = 156543.0339 * 2; if (this.baseLayer && this.baseLayer.wrapDateLine) { var resolution, resolutions = this.getResolutions(), // maxResolution = this.getMaxExtent().getWidth() / this.size.w; diff --git a/geonode/client/templates/geoext/maps/map_geoexplorer_viewer.js b/geonode/client/templates/geoext/maps/map_geoexplorer_viewer.js index 02112ae48f2..6f2715f6636 100644 --- a/geonode/client/templates/geoext/maps/map_geoexplorer_viewer.js +++ b/geonode/client/templates/geoext/maps/map_geoexplorer_viewer.js @@ -52,7 +52,8 @@ Ext.onReady(function() { 305.74811309814453, 152.87405654907226, 76.43702827453613, 38.218514137268066, 19.109257068634033, 9.554628534317017, 4.777314267158508, 2.388657133579254, 1.194328566789627, - 0.5971642833948135, 0.25, 0.1, 0.05]; + 0.5971642833948135, 0.2985821416974067, 0.1492910708487033, + 0.0746455354243516]; } app.mapPanel.map.getServerResolutions = function() { return [156543.03390625, 78271.516953125, 39135.7584765625, diff --git a/geonode/client/templates/geoext/maps/map_include.html b/geonode/client/templates/geoext/maps/map_include.html index 1c0cff7bec8..4ad18e52165 100644 --- a/geonode/client/templates/geoext/maps/map_include.html +++ b/geonode/client/templates/geoext/maps/map_include.html @@ -54,7 +54,8 @@ 305.74811309814453, 152.87405654907226, 76.43702827453613, 38.218514137268066, 19.109257068634033, 9.554628534317017, 4.777314267158508, 2.388657133579254, 1.194328566789627, - 0.5971642833948135, 0.25, 0.1, 0.05]; + 0.5971642833948135, 0.2985821416974067, 0.1492910708487033, + 0.0746455354243516]; } app.mapPanel.map.getServerResolutions = function() { return [156543.03390625, 78271.516953125, 39135.7584765625,