Changeset 13035 in osm for applications/viewer/jmapviewer


Ignore:
Timestamp:
2009-01-08T09:39:31+01:00 (16 years ago)
Author:
stotz
Message:

OSM cycle maps URL changed from thunderflames.org to [abc].andy.sandbox.cloudmade.com

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/OsmTileSource.java

    r11783 r13035  
    77        public static final String MAP_MAPNIK = "http://tile.openstreetmap.org";
    88        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";
    109
    1110        protected static abstract class AbstractOsmTileSource implements TileSource {
     
    5554        public static class CycleMap extends AbstractOsmTileSource {
    5655               
    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        }
    5869
    5970                public String getName() {
    6071                        return NAME;
    61                 }
    62 
    63                 @Override
    64                 public String getTileUrl(int zoom, int tilex, int tiley) {
    65                         return MAP_CYCLE + super.getTileUrl(zoom, tilex, tiley);
    6672                }
    6773
Note: See TracChangeset for help on using the changeset viewer.