[Git][debian-gis-team/jmapviewer][master] 4 commits: New upstream version 2.9+dfsg
Bas Couwenberg
gitlab at salsa.debian.org
Tue Jan 1 09:45:51 GMT 2019
Bas Couwenberg pushed to branch master at Debian GIS Project / jmapviewer
Commits:
a8bdd4fa by Bas Couwenberg at 2019-01-01T09:12:45Z
New upstream version 2.9+dfsg
- - - - -
8872194f by Bas Couwenberg at 2019-01-01T09:12:46Z
Merge tag 'upstream/2.9+dfsg'
Upstream version 2.9+dfsg
- - - - -
6aa4292a by Bas Couwenberg at 2019-01-01T09:13:07Z
New upstream release.
- - - - -
b6d2f066 by Bas Couwenberg at 2019-01-01T09:16:50Z
Set distribution to unstable.
- - - - -
10 changed files:
- build.xml
- debian/changelog
- src/org/openstreetmap/gui/jmapviewer/Demo.java
- src/org/openstreetmap/gui/jmapviewer/OsmTileLoader.java
- src/org/openstreetmap/gui/jmapviewer/checkBoxTree/CheckBoxTree.java
- src/org/openstreetmap/gui/jmapviewer/interfaces/TileSource.java
- src/org/openstreetmap/gui/jmapviewer/tilesources/BingAerialTileSource.java
- src/org/openstreetmap/gui/jmapviewer/tilesources/OsmTileSource.java
- src/org/openstreetmap/gui/jmapviewer/tilesources/ScanexTileSource.java
- src/org/openstreetmap/gui/jmapviewer/tilesources/TileSourceInfo.java
Changes:
=====================================
build.xml
=====================================
@@ -150,7 +150,7 @@
private="true"
linksource="true"
author="false">
- <link href="http://docs.oracle.com/javase/8/docs/api"/>
+ <link href="https://docs.oracle.com/javase/8/docs/api"/>
<doctitle><![CDATA[<h2>JMapViewer - Javadoc</h2>]]></doctitle>
<bottom><![CDATA[<a href="https://josm.openstreetmap.de/">JMapViewer</a>]]></bottom>
<arg value="-html5" if:set="isJava9" />
=====================================
debian/changelog
=====================================
@@ -1,8 +1,9 @@
-jmapviewer (2.8+dfsg-2) UNRELEASED; urgency=medium
+jmapviewer (2.9+dfsg-1) unstable; urgency=medium
+ * New upstream release.
* Bump Standards-Version to 4.3.0, no changes.
- -- Bas Couwenberg <sebastic at debian.org> Tue, 25 Dec 2018 22:25:57 +0100
+ -- Bas Couwenberg <sebastic at debian.org> Tue, 01 Jan 2019 10:16:40 +0100
jmapviewer (2.8+dfsg-1) unstable; urgency=medium
=====================================
src/org/openstreetmap/gui/jmapviewer/Demo.java
=====================================
@@ -80,7 +80,7 @@ public class Demo extends JFrame implements JMapViewerEventListener {
button.addActionListener(e -> map().setDisplayToFitMapMarkers());
JComboBox<TileSource> tileSourceSelector = new JComboBox<>(new TileSource[] {
new OsmTileSource.Mapnik(),
- new OsmTileSource.CycleMap(),
+ new OsmTileSource.TransportMap(),
new BingAerialTileSource(),
});
tileSourceSelector.addItemListener(new ItemListener() {
=====================================
src/org/openstreetmap/gui/jmapviewer/OsmTileLoader.java
=====================================
@@ -1,6 +1,8 @@
// License: GPL. For details, see Readme.txt file.
package org.openstreetmap.gui.jmapviewer;
+import static org.openstreetmap.gui.jmapviewer.FeatureAdapter.tr;
+
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
@@ -49,7 +51,7 @@ public class OsmTileLoader implements TileLoader {
}
loadTileMetadata(tile, conn);
if ("no-tile".equals(tile.getValue("tile-info"))) {
- tile.setError("No tile at this zoom level");
+ tile.setError(tr("No tiles at this zoom level"));
} else {
input = conn.getInputStream();
try {
=====================================
src/org/openstreetmap/gui/jmapviewer/checkBoxTree/CheckBoxTree.java
=====================================
@@ -9,8 +9,6 @@ import javax.swing.JScrollPane;
import javax.swing.JTree;
import javax.swing.event.TreeModelEvent;
import javax.swing.event.TreeModelListener;
-import javax.swing.event.TreeSelectionEvent;
-import javax.swing.event.TreeSelectionListener;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.DefaultTreeModel;
=====================================
src/org/openstreetmap/gui/jmapviewer/interfaces/TileSource.java
=====================================
@@ -91,7 +91,7 @@ public interface TileSource extends Attributed {
* @param lo1 longitude of first point
* @param la2 latitude of second point
* @param lo2 longitude of second point
- * @return the distance betwen first and second point, in m.
+ * @return the distance between first and second point, in m.
*/
double getDistance(double la1, double lo1, double la2, double lo2);
=====================================
src/org/openstreetmap/gui/jmapviewer/tilesources/BingAerialTileSource.java
=====================================
@@ -37,7 +37,8 @@ import org.xml.sax.SAXException;
/**
* Tile source for the Bing Maps REST Imagery API.
- * @see <a href="https://msdn.microsoft.com/en-us/library/ff701724.aspx">MSDN</a>
+ * @see <a href="https://msdn.microsoft.com/en-us/library/bb259689.aspx">MSDN (1)</a>
+ * and <a href="https://msdn.microsoft.com/en-us/library/ff701724.aspx">MSDN (2)</a>
*/
public class BingAerialTileSource extends TMSTileSource {
@@ -57,6 +58,7 @@ public class BingAerialTileSource extends TMSTileSource {
*/
public BingAerialTileSource() {
super(new TileSourceInfo("Bing", null, null));
+ minZoom = 1;
}
/**
=====================================
src/org/openstreetmap/gui/jmapviewer/tilesources/OsmTileSource.java
=====================================
@@ -25,7 +25,7 @@ public class OsmTileSource {
* Constructs a new {@code "Mapnik"} tile source.
*/
public Mapnik() {
- super("Mapnik", PATTERN, "MAPNIK");
+ super("OpenStreetMap Carto", PATTERN, "standard");
modTileFeatures = true;
}
@@ -40,9 +40,9 @@ public class OsmTileSource {
/**
* The "Cycle Map" OSM tile source.
*/
- public static class CycleMap extends AbstractOsmTileSource {
+ public abstract static class CycleMap extends AbstractOsmTileSource {
- private static final String PATTERN = "http://%s.tile.opencyclemap.org/cycle";
+ private static final String PATTERN = "https://%s.tile.thunderforest.com/cycle";
private static final String[] SERVER = {"a", "b", "c"};
@@ -52,7 +52,7 @@ public class OsmTileSource {
* Constructs a new {@code CycleMap} tile source.
*/
public CycleMap() {
- super("Cyclemap", PATTERN, "opencyclemap");
+ super("OpenCycleMap", PATTERN, "opencyclemap");
}
@Override
@@ -62,45 +62,45 @@ public class OsmTileSource {
return url;
}
+ /**
+ * Get the thunderforest API key.
+ *
+ * Needs to be registered at their web site.
+ * @return the API key
+ */
+ protected abstract String getApiKey();
+
@Override
public int getMaxZoom() {
return 18;
}
+
+ @Override
+ public String getTileUrl(int zoom, int tilex, int tiley) throws IOException {
+ return this.getBaseUrl() + getTilePath(zoom, tilex, tiley) + "?apikey=" + getApiKey();
+ }
+
+ @Override
+ public String getTermsOfUseText() {
+ return "Maps © Thunderforest";
+ }
+
+ @Override
+ public String getTermsOfUseURL() {
+ return "https://thunderforest.com/terms/";
+ }
}
/**
* The "Transport Map" OSM tile source.
- *
- * Template for thunderforest.com.
*/
- public abstract static class TransportMap extends AbstractOsmTileSource {
-
- private static final String PATTERN = "https://%s.tile.thunderforest.com/transport";
-
- private static final String[] SERVER = {"a", "b", "c"};
-
- private int serverNum;
+ public static class TransportMap extends AbstractOsmTileSource {
/**
* Constructs a new {@code TransportMap} tile source.
*/
public TransportMap() {
- super("OSM Transport Map", PATTERN, "osmtransportmap");
- }
-
- /**
- * Get the thunderforest API key.
- *
- * Needs to be registered at their web site.
- * @return the API key
- */
- protected abstract String getApiKey();
-
- @Override
- public String getBaseUrl() {
- String url = String.format(this.baseUrl, new Object[] {SERVER[serverNum]});
- serverNum = (serverNum + 1) % SERVER.length;
- return url;
+ super("Public Transport", "https://tile.memomaps.de/tilegen", "public_transport_oepnv");
}
@Override
@@ -108,20 +108,14 @@ public class OsmTileSource {
return 18;
}
- @Override
- public String getTileUrl(int zoom, int tilex, int tiley) throws IOException {
- return this.getBaseUrl() + getTilePath(zoom, tilex, tiley) + "?apikey=" + getApiKey();
- }
-
@Override
public String getAttributionText(int zoom, ICoordinate topLeft, ICoordinate botRight) {
- return "Maps © Thunderforest, Data © OpenStreetMap contributors";
+ return "© OpenStreetMap contributors, CC-BY-SA";
}
@Override
public String getAttributionLinkURL() {
- return "http://www.thunderforest.com/";
+ return "https://öpnvkarte.de/<";
}
}
-
}
=====================================
src/org/openstreetmap/gui/jmapviewer/tilesources/ScanexTileSource.java
=====================================
@@ -28,8 +28,7 @@ public class ScanexTileSource extends TMSTileSource {
private static final String API_KEY = "4018C5A9AECAD8868ED5DEB2E41D09F7";
private enum ScanexLayer {
- IRS("irs", "/TileSender.ashx?ModeKey=tile&MapName=F7B8CF651682420FA1749D894C8AD0F6&LayerName=BAC78D764F0443BD9AF93E7A998C9F5B"),
- SPOT("spot", "/TileSender.ashx?ModeKey=tile&MapName=F7B8CF651682420FA1749D894C8AD0F6&LayerName=F51CE95441284AF6B2FC319B609C7DEC");
+ IRS("irs", "/TileSender.ashx?ModeKey=tile&MapName=F7B8CF651682420FA1749D894C8AD0F6&LayerName=BAC78D764F0443BD9AF93E7A998C9F5B");
private final String name;
private final String uri;
=====================================
src/org/openstreetmap/gui/jmapviewer/tilesources/TileSourceInfo.java
=====================================
@@ -107,7 +107,7 @@ public class TileSourceInfo {
}
/**
- * Checkusm for empty tiles for servers delivering such tile types
+ * Checksum for empty tiles for servers delivering such tile types
* @return map of checksums, that when detected, means that this is "no tile at this zoom level" situation
* @since 32022
*/
View it on GitLab: https://salsa.debian.org/debian-gis-team/jmapviewer/compare/42a8ed3a4436ad2fa136ff84bb0aaf7424223471...b6d2f0663e2a66ad1329c3c269347b2c6ff9eefe
--
View it on GitLab: https://salsa.debian.org/debian-gis-team/jmapviewer/compare/42a8ed3a4436ad2fa136ff84bb0aaf7424223471...b6d2f0663e2a66ad1329c3c269347b2c6ff9eefe
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20190101/47da3771/attachment-0001.html>
More information about the Pkg-grass-devel
mailing list