diff -Nru trunk_6920/src/org/openstreetmap/gui/jmapviewer/tilesources/AbstractOsmTileSource.java trunk/src/org/openstreetmap/gui/jmapviewer/tilesources/AbstractOsmTileSource.java
|
old
|
new
|
|
| 11 | 11 | public abstract class AbstractOsmTileSource extends AbstractTMSTileSource { |
| 12 | 12 | |
| 13 | 13 | /** |
| 14 | | * The OSM attribution. Must be always in line with <a href="http://www.openstreetmap.org/copyright/en">http://www.openstreetmap.org/copyright/en</a> |
| | 14 | * The OSM attribution. Must be always in line with <a href="https://www.openstreetmap.org/copyright/en">https://www.openstreetmap.org/copyright/en</a> |
| 15 | 15 | */ |
| 16 | 16 | public static final String DEFAULT_OSM_ATTRIBUTION = "\u00a9 OpenStreetMap contributors"; |
| 17 | 17 | |
| … |
… |
|
| 40 | 40 | |
| 41 | 41 | @Override |
| 42 | 42 | public String getAttributionLinkURL() { |
| 43 | | return "http://openstreetmap.org/"; |
| | 43 | return "https://openstreetmap.org/"; |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | @Override |
| … |
… |
|
| 60 | 60 | |
| 61 | 61 | @Override |
| 62 | 62 | public String getTermsOfUseURL() { |
| 63 | | return "http://www.openstreetmap.org/copyright"; |
| | 63 | return "https://www.openstreetmap.org/copyright"; |
| 64 | 64 | } |
| 65 | 65 | } |
diff -Nru trunk_6920/src/org/openstreetmap/gui/jmapviewer/tilesources/OsmTileSource.java trunk/src/org/openstreetmap/gui/jmapviewer/tilesources/OsmTileSource.java
|
old
|
new
|
|
| 7 | 7 | public class OsmTileSource { |
| 8 | 8 | |
| 9 | 9 | /** |
| 10 | | * The default "Mapnik" OSM tile source URL |
| 11 | | */ |
| 12 | | public static final String MAP_MAPNIK = "http://tile.openstreetmap.org"; |
| 13 | | |
| 14 | | /** |
| 15 | 10 | * The default "Mapnik" OSM tile source. |
| 16 | 11 | */ |
| 17 | 12 | public static class Mapnik extends AbstractOsmTileSource { |
| | 13 | |
| | 14 | private static final String PATTERN = "https://%s.tile.openstreetmap.org"; |
| | 15 | |
| | 16 | private static final String[] SERVER = { "a", "b", "c" }; |
| | 17 | |
| | 18 | private int SERVER_NUM = 0; |
| 18 | 19 | |
| 19 | 20 | /** |
| 20 | 21 | * Constructs a new {@code "Mapnik"} tile source. |
| 21 | 22 | */ |
| 22 | 23 | public Mapnik() { |
| 23 | | super("Mapnik", MAP_MAPNIK); |
| | 24 | super("Mapnik", PATTERN); |
| | 25 | } |
| | 26 | |
| | 27 | @Override |
| | 28 | public String getBaseUrl() { |
| | 29 | String url = String.format(this.baseUrl, new Object[] { SERVER[SERVER_NUM] }); |
| | 30 | SERVER_NUM = (SERVER_NUM + 1) % SERVER.length; |
| | 31 | return url; |
| | 32 | } |
| | 33 | |
| | 34 | @Override |
| | 35 | public int getMaxZoom() { |
| | 36 | return 19; |
| 24 | 37 | } |
| 25 | 38 | |
| 26 | 39 | public TileUpdate getTileUpdate() { |