Changeset 31371 in osm for applications/viewer/jmapviewer
- Timestamp:
- 2015-07-13T00:10:52+02:00 (9 years ago)
- Location:
- applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/TileSource.java
r31310 r31371 97 97 98 98 /** 99 * Creates tile identifier that is unique among all tile sources, but the same tile will always 100 * get the same identifier. Used for creation of cache key. 101 * 102 * @param zoom 103 * @param tilex 104 * @param tiley 105 * @return tile identifier 106 */ 107 String getTileId(int zoom, int tilex, int tiley); 108 109 /** 99 110 * Specifies how large each tile is. 100 111 * @return The size of a single tile in pixels. -1 if default size should be used … … 145 156 public Point latLonToXY(double lat, double lon, int zoom); 146 157 158 /** 159 * @param point 160 * @param zoom 161 * @return transforms longitude and latitude to pixel space (as if all tiles at specified zoom level where joined) 162 */ 147 163 public Point latLonToXY(ICoordinate point, int zoom); 148 164 … … 172 188 public ICoordinate XYToLatLon(Point point, int zoom); 173 189 190 /** 191 * 192 * @param x 193 * @param y 194 * @param zoom 195 * @return WGS84 Coordinates of given point 196 */ 174 197 public ICoordinate XYToLatLon(int x, int y, int zoom); 175 198 … … 200 223 public TileXY latLonToTileXY(double lat, double lon, int zoom); 201 224 225 /** 226 * 227 * @param point 228 * @param zoom 229 * @return x and y tile indices 230 */ 202 231 public TileXY latLonToTileXY(ICoordinate point, int zoom); 203 232 … … 227 256 public ICoordinate tileXYToLatLon(TileXY xy, int zoom); 228 257 258 /** 259 * 260 * @param tile 261 * @return WGS84 coordinates of given tile 262 */ 229 263 public ICoordinate tileXYToLatLon(Tile tile); 230 264 265 /** 266 * 267 * @param x 268 * @param y 269 * @param zoom 270 * @return WGS84 coordinates of given tile 271 */ 231 272 public ICoordinate tileXYToLatLon(int x, int y, int zoom); 232 273 -
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/AbstractTMSTileSource.java
r31339 r31371 278 278 } 279 279 280 @Override 281 public String getTileId(int zoom, int tilex, int tiley) { 282 return this.baseUrl + "/" + zoom + "/" + tilex + "/" + tiley; 283 } 284 280 285 private int getTileMax(int zoom) { 281 286 return (int)Math.pow(2.0, zoom) - 1;
Note:
See TracChangeset
for help on using the changeset viewer.