Changeset 25694 in osm for applications/viewer/jmapviewer/src
- Timestamp:
- 2011-03-24T21:06:37+01:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/TemplatedTMSTileSource.java
r25369 r25694 4 4 public class TemplatedTMSTileSource extends AbstractOsmTileSource { 5 5 private int maxZoom; 6 6 7 7 public TemplatedTMSTileSource(String name, String url, int maxZoom) { 8 8 super(name, url); … … 10 10 } 11 11 12 @Override 12 13 public String getTileUrl(int zoom, int tilex, int tiley) { 13 14 return this.baseUrl 14 15 .replaceAll("\\{zoom\\}", Integer.toString(zoom)) 15 16 .replaceAll("\\{x\\}", Integer.toString(tilex)) 16 .replaceAll("\\{y\\}", Integer.toString(tiley)); 17 17 .replaceAll("\\{y\\}", Integer.toString(tiley)) 18 .replaceAll("\\{!y\\}", Integer.toString((int)Math.pow(2, zoom)-1-tiley)); 19 18 20 } 19 21
Note:
See TracChangeset
for help on using the changeset viewer.