Skip to content

Commit

Permalink
AtlasMapper 2.4.1
Browse files Browse the repository at this point in the history
- Fixed bug with layer locate button, introduced with WMTS feature.
  • Loading branch information
gaellafond committed Sep 28, 2022
1 parent 18b36d1 commit 32313bb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions clientResources/amc/modules/MapPanel/Layer/AbstractLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ Atlas.Layer.AbstractLayer = OpenLayers.Class({
computeExtent: function() {
var bounds = null;
if (this.layer && this.layer.atlasLayer && this.layer.atlasLayer.json && this.layer.atlasLayer.json['layerBoundingBox']) {
bounds = this.getExtent(this.layer.atlasLayer.json, this.mapPanel);
bounds = this.reprojectExtent(this.layer.atlasLayer.json, this.mapPanel);
}

if (bounds == null && typeof(this.layer.getDataExtent) === 'function') {
Expand All @@ -546,15 +546,15 @@ Atlas.Layer.AbstractLayer = OpenLayers.Class({
return bounds;
},

getExtent: function(json, mapPanel) {
reprojectExtent: function(json, mapPanel) {
var bounds = null;
if (json && json['layerBoundingBox']) {
// Bounds order in JSon: left, bottom, right, top
var boundsArray = json['layerBoundingBox'];

// Bounds order as requested by OpenLayers: left, bottom, right, top
// NOTE: Re-projection can not work properly if the top or bottom overpass 85
var bounds = new OpenLayers.Bounds(
bounds = new OpenLayers.Bounds(
(boundsArray[0] < -180 ? -180 : (boundsArray[0] > 180 ? 180 : boundsArray[0])),
(boundsArray[1] < -85 ? -85 : (boundsArray[1] > 85 ? 85 : boundsArray[1])),
(boundsArray[2] < -180 ? -180 : (boundsArray[2] > 180 ? 180 : boundsArray[2])),
Expand Down
2 changes: 1 addition & 1 deletion clientResources/amc/modules/MapPanel/Layer/WMTS.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ Atlas.Layer.WMTS = OpenLayers.Class(Atlas.Layer.WMS, {
'matrixIds': matrixIds,
'isBaseLayer': false,
'wrapX': true,
'tileFullExtent': this.getExtent(this.json, mapPanel)
'tileFullExtent': this.reprojectExtent(this.json, mapPanel)
}));

// https://github.com/openlayers/ol2/blob/master/notes/2.12.md
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<groupId>au.gov.aims</groupId>
<artifactId>atlasmapper</artifactId>
<packaging>war</packaging>
<version>2.4.0</version>
<version>2.4.1</version>
<name>AtlasMapper server and clients</name>
<description>This application compiled as a single War, that can be deployed in Tomcat, without any other dependency.\n\
It contains:\n\
Expand Down

0 comments on commit 32313bb

Please sign in to comment.