Skip to content

Commit

Permalink
AtlasMapper 2.4.2
Browse files Browse the repository at this point in the history
- Added support for EPSG:3857
  • Loading branch information
gaellafond committed Dec 20, 2022
1 parent 32313bb commit 87e37be
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion clientResources/amc/modules/MapPanel/Layer/NCWMS.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Atlas.Layer.NCWMS = OpenLayers.Class(Atlas.Layer.WMS, {
}

if (projectionCode !== null && projectionCode === 'EPSG:900913') {
// ncWMS do not support EPSG:900913, but it support EPSG:3857 which is the same thing.
// ncWMS do not support EPSG:900913, but it supports EPSG:3857 which is the same thing.
layerOptions.projection = 'EPSG:3857';
}
}
Expand Down
2 changes: 1 addition & 1 deletion clientResources/amc/modules/MapPanel/Layer/THREDDS.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Atlas.Layer.THREDDS = OpenLayers.Class(Atlas.Layer.WMS, {
}

if (projectionCode !== null && projectionCode === 'EPSG:900913') {
// THREDDS do not support EPSG:900913, but it support EPSG:3857 which is the same thing.
// THREDDS do not support EPSG:900913, but it supports EPSG:3857 which is the same thing.
layerOptions.projection = 'EPSG:3857';
}
}
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.1</version>
<version>2.4.2</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
9 changes: 2 additions & 7 deletions src/main/java/au/gov/aims/atlasmapperserver/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -112,19 +112,14 @@ public class Utils {
.put("maxResolution", 156543.033928)
.put("resolutions", new JSONArray("[156543.033928, 78271.5169639999, 39135.7584820001, 19567.8792409999, 9783.93962049996, 4891.96981024998, 2445.98490512499, 1222.99245256249, 611.49622628138, 305.748113140558, 152.874056570411, 76.4370282850732, 38.2185141425366, 19.1092570712683, 9.55462853563415, 4.77731426794937, 2.38865713397468, 1.19432856685505, 0.597164283559817, 0.298582141647617]")));

/*
// TODO Try with 3857
// OpenLayers is not able to do the re-projection of EPSG:3785.
SUPPORTED_PROJECTIONS.put("EPSG:3785", new JSONObject()
.put("projectionName", "Mercator (EPSG:3785)")
SUPPORTED_PROJECTIONS.put("EPSG:3857", new JSONObject()
.put("projectionName", "Pseudo-Mercator (EPSG:3857)")
.put("maxExtent", new JSONArray("[-20037508.342787, -20037508.342787, 20037508.342787, 20037508.342787]"))
.put("units", "m")
.put("numZoomLevels", 20)
.put("maxResolution", 156543.033928)
.put("resolutions", new JSONArray("[156543.033928, 78271.5169639999, 39135.7584820001, 19567.8792409999, 9783.93962049996, 4891.96981024998, 2445.98490512499, 1222.99245256249, 611.49622628138, 305.748113140558, 152.874056570411, 76.4370282850732, 38.2185141425366, 19.1092570712683, 9.55462853563415, 4.77731426794937, 2.38865713397468, 1.19432856685505, 0.597164283559817, 0.298582141647617]")));
*/

// TODO Add more projections
} catch (JSONException ex) {
LOGGER.log(Level.SEVERE, "Can not create the JSON map of supported projections: {0}", Utils.getExceptionMessage(ex));
LOGGER.log(Level.FINE, "Stack trace:", ex);
Expand Down

0 comments on commit 87e37be

Please sign in to comment.