Changeset 13035 in osm for applications
- Timestamp:
- 2009-01-08T09:39:31+01:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/OsmTileSource.java
r11783 r13035 7 7 public static final String MAP_MAPNIK = "http://tile.openstreetmap.org"; 8 8 public static final String MAP_OSMA = "http://tah.openstreetmap.org/Tiles/tile"; 9 public static final String MAP_CYCLE = "http://www.thunderflames.org/tiles/cycle";10 9 11 10 protected static abstract class AbstractOsmTileSource implements TileSource { … … 55 54 public static class CycleMap extends AbstractOsmTileSource { 56 55 57 public static String NAME = "OSM Cycle Map"; 56 private static final String PATTERN = "http://%s.andy.sandbox.cloudmade.com/tiles/cycle/%d/%d/%d.png"; 57 public static String NAME = "OSM Cycle Map"; 58 59 private static final String[] SERVER = { "a", "b", "c" }; 60 61 private int SERVER_NUM = 0; 62 63 @Override 64 public String getTileUrl(int zoom, int tilex, int tiley) { 65 String url = String.format(PATTERN, new Object[] { SERVER[SERVER_NUM], zoom, tilex, tiley }); 66 SERVER_NUM = (SERVER_NUM + 1) % SERVER.length; 67 return url; 68 } 58 69 59 70 public String getName() { 60 71 return NAME; 61 }62 63 @Override64 public String getTileUrl(int zoom, int tilex, int tiley) {65 return MAP_CYCLE + super.getTileUrl(zoom, tilex, tiley);66 72 } 67 73
Note:
See TracChangeset
for help on using the changeset viewer.