Changeset 33320 in osm for applications/viewer/jmapviewer
- Timestamp:
- 2017-05-17T10:57:09+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/OsmTileSource.java
r33314 r33320 72 72 * 73 73 * Template for thunderforest.com. 74 * Requires registration of an API key (see {@link #API_KEY}).75 74 */ 76 public static class TransportMap extends AbstractOsmTileSource { 77 78 private static final String API_KEY = "API_KEY_HERE"; 75 public abstract static class TransportMap extends AbstractOsmTileSource { 79 76 80 77 private static final String PATTERN = "https://%s.tile.thunderforest.com/transport"; … … 90 87 super("OSM Transport Map", PATTERN, "osmtransportmap"); 91 88 } 89 90 /** 91 * Get the thunderforest API key. 92 * 93 * Needs to be registered at their web site. 94 * @return the API key 95 */ 96 protected abstract String getApiKey(); 92 97 93 98 @Override … … 105 110 @Override 106 111 public String getTileUrl(int zoom, int tilex, int tiley) throws IOException { 107 return this.getBaseUrl() + getTilePath(zoom, tilex, tiley) + "?apikey=" + API_KEY;112 return this.getBaseUrl() + getTilePath(zoom, tilex, tiley) + "?apikey=" + getApiKey(); 108 113 } 109 114
Note:
See TracChangeset
for help on using the changeset viewer.