Skip to content

Commit

Permalink
- Fix max zoom issue
Browse files Browse the repository at this point in the history
  • Loading branch information
afabiani committed Jul 7, 2018
1 parent c516450 commit 5761b91
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
7 changes: 4 additions & 3 deletions geonode/client/templates/geoext/layers/layer_geoext_map.html
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
9 changes: 5 additions & 4 deletions geonode/client/templates/geoext/maps/map_geoexplorer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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));
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion geonode/client/templates/geoext/maps/map_include.html
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 5761b91

Please sign in to comment.