[jmapviewer] 01/04: Imported Upstream version 1.17+dfsg

Bas Couwenberg sebastic at debian.org
Mon Jul 11 14:59:48 UTC 2016


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch master
in repository jmapviewer.

commit a79156a40ec9e61d5d07ff6af9a922a1525002a0
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Mon Jul 11 11:04:50 2016 +0200

    Imported Upstream version 1.17+dfsg
---
 src/org/openstreetmap/gui/jmapviewer/DefaultMapController.java      | 3 ++-
 src/org/openstreetmap/gui/jmapviewer/Demo.java                      | 2 +-
 src/org/openstreetmap/gui/jmapviewer/OsmMercator.java               | 2 +-
 src/org/openstreetmap/gui/jmapviewer/Tile.java                      | 4 ++++
 .../openstreetmap/gui/jmapviewer/tilesources/ScanexTileSource.java  | 4 ----
 .../gui/jmapviewer/tilesources/TemplatedTMSTileSource.java          | 6 +++---
 6 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/src/org/openstreetmap/gui/jmapviewer/DefaultMapController.java b/src/org/openstreetmap/gui/jmapviewer/DefaultMapController.java
index 7b5e75f..9575284 100644
--- a/src/org/openstreetmap/gui/jmapviewer/DefaultMapController.java
+++ b/src/org/openstreetmap/gui/jmapviewer/DefaultMapController.java
@@ -7,6 +7,7 @@ import java.awt.event.MouseListener;
 import java.awt.event.MouseMotionListener;
 import java.awt.event.MouseWheelEvent;
 import java.awt.event.MouseWheelListener;
+import java.util.Locale;
 
 /**
  * Default map controller which implements map moving by pressing the right
@@ -184,6 +185,6 @@ MouseWheelListener {
      */
     public static boolean isPlatformOsx() {
         String os = System.getProperty("os.name");
-        return os != null && os.toLowerCase().startsWith("mac os x");
+        return os != null && os.toLowerCase(Locale.ENGLISH).startsWith("mac os x");
     }
 }
diff --git a/src/org/openstreetmap/gui/jmapviewer/Demo.java b/src/org/openstreetmap/gui/jmapviewer/Demo.java
index f3ec77b..2f9d7b7 100644
--- a/src/org/openstreetmap/gui/jmapviewer/Demo.java
+++ b/src/org/openstreetmap/gui/jmapviewer/Demo.java
@@ -34,7 +34,7 @@ import org.openstreetmap.gui.jmapviewer.tilesources.OsmTileSource;
  * @author Jan Peter Stotz
  *
  */
-public class Demo extends JFrame implements JMapViewerEventListener  {
+public class Demo extends JFrame implements JMapViewerEventListener {
 
     private static final long serialVersionUID = 1L;
 
diff --git a/src/org/openstreetmap/gui/jmapviewer/OsmMercator.java b/src/org/openstreetmap/gui/jmapviewer/OsmMercator.java
index 6f89d33..631b9ca 100644
--- a/src/org/openstreetmap/gui/jmapviewer/OsmMercator.java
+++ b/src/org/openstreetmap/gui/jmapviewer/OsmMercator.java
@@ -21,7 +21,7 @@ public class OsmMercator {
     /** minimum latitude (south) for mercator display */
     public static final double MIN_LAT = -85.05112877980659;
     /** equatorial earth radius for EPSG:3857 (Mercator) */
-    public static final double EARTH_RADIUS = 6378137;
+    public static final double EARTH_RADIUS = 6_378_137;
 
     /**
      * instance with tile size of 256 for easy conversions
diff --git a/src/org/openstreetmap/gui/jmapviewer/Tile.java b/src/org/openstreetmap/gui/jmapviewer/Tile.java
index 67c8c1e..58343ac 100644
--- a/src/org/openstreetmap/gui/jmapviewer/Tile.java
+++ b/src/org/openstreetmap/gui/jmapviewer/Tile.java
@@ -361,6 +361,10 @@ public class Tile {
         return error_message;
     }
 
+    public void setError(Exception e) {
+        setError(e.toString());
+    }
+
     public void setError(String message) {
         error = true;
         setImage(ERROR_IMAGE);
diff --git a/src/org/openstreetmap/gui/jmapviewer/tilesources/ScanexTileSource.java b/src/org/openstreetmap/gui/jmapviewer/tilesources/ScanexTileSource.java
index e518dc4..b81fe22 100644
--- a/src/org/openstreetmap/gui/jmapviewer/tilesources/ScanexTileSource.java
+++ b/src/org/openstreetmap/gui/jmapviewer/tilesources/ScanexTileSource.java
@@ -23,10 +23,6 @@ public class ScanexTileSource extends TMSTileSource {
 
     // Latitude to Y and back calculations.
 
-    /** radius of Earth at equator, m */
-    private static double RADIUS_E = 6378137;
-    /** equator length, m */
-    private static double EQUATOR = 40075016.68557849;
     /** eccentricity of Earth's ellipsoid */
     private static double E = 0.0818191908426;
 
diff --git a/src/org/openstreetmap/gui/jmapviewer/tilesources/TemplatedTMSTileSource.java b/src/org/openstreetmap/gui/jmapviewer/tilesources/TemplatedTMSTileSource.java
index e85babb..1c38453 100644
--- a/src/org/openstreetmap/gui/jmapviewer/tilesources/TemplatedTMSTileSource.java
+++ b/src/org/openstreetmap/gui/jmapviewer/tilesources/TemplatedTMSTileSource.java
@@ -28,13 +28,13 @@ import org.openstreetmap.gui.jmapviewer.interfaces.TemplatedTileSource;
  *                                  used to specify many tile servers
  * {header:(HEADER_NAME,HEADER_VALUE)} - sets the headers to be sent to tile server
  */
-
 public class TemplatedTMSTileSource extends TMSTileSource implements TemplatedTileSource {
 
     private Random rand;
     private String[] randomParts;
     private final Map<String, String> headers = new HashMap<>();
 
+    // CHECKSTYLE.OFF: SingleSpaceSeparator
     private static final String COOKIE_HEADER   = "Cookie";
     private static final String PATTERN_ZOOM    = "\\{(?:(\\d+)-)?z(?:oom)?([+-]\\d+)?\\}";
     private static final String PATTERN_X       = "\\{x\\}";
@@ -43,10 +43,10 @@ public class TemplatedTMSTileSource extends TMSTileSource implements TemplatedTi
     private static final String PATTERN_NEG_Y   = "\\{-y\\}";
     private static final String PATTERN_SWITCH  = "\\{switch:([^}]+)\\}";
     private static final String PATTERN_HEADER  = "\\{header\\(([^,]+),([^}]+)\\)\\}";
+    // CHECKSTYLE.ON: SingleSpaceSeparator
 
     private static final String[] ALL_PATTERNS = {
-        PATTERN_HEADER, PATTERN_ZOOM, PATTERN_X, PATTERN_Y, PATTERN_Y_YAHOO, PATTERN_NEG_Y,
-        PATTERN_SWITCH
+        PATTERN_HEADER, PATTERN_ZOOM, PATTERN_X, PATTERN_Y, PATTERN_Y_YAHOO, PATTERN_NEG_Y, PATTERN_SWITCH
     };
 
     /**

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/jmapviewer.git



More information about the Pkg-grass-devel mailing list