Changeset 32024 in osm for applications/viewer
- Timestamp:
- 2016-01-24T22:52:12+01:00 (9 years ago)
- Location:
- applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/AbstractTMSTileSource.java
r32023 r32024 50 50 this.metadataHeaders = info.getMetadataHeaders(); 51 51 this.tileSize = info.getTileSize(); 52 this.osmMercator = new OsmMercator(this. tileSize);52 this.osmMercator = new OsmMercator(this.getTileSize()); 53 53 } 54 54 … … 161 161 public TileXY latLonToTileXY(double lat, double lon, int zoom) { 162 162 return new TileXY( 163 osmMercator.lonToX(lon, zoom) / tileSize,164 osmMercator.latToY(lat, zoom) / tileSize163 osmMercator.lonToX(lon, zoom) / getTileSize(), 164 osmMercator.latToY(lat, zoom) / getTileSize() 165 165 ); 166 166 } … … 184 184 public ICoordinate tileXYToLatLon(int x, int y, int zoom) { 185 185 return new Coordinate( 186 osmMercator.yToLat(y * tileSize, zoom),187 osmMercator.xToLon(x * tileSize, zoom)186 osmMercator.yToLat(y * getTileSize(), zoom), 187 osmMercator.xToLon(x * getTileSize(), zoom) 188 188 ); 189 189 } -
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/TileSourceInfo.java
r32022 r32024 4 4 import java.util.List; 5 5 import java.util.Map; 6 7 import org.openstreetmap.gui.jmapviewer.OsmMercator;8 6 9 7 /** … … 38 36 39 37 /** tile size of the displayed tiles */ 40 private int tileSize = OsmMercator.DEFAUL_TILE_SIZE; // FIXME: set to -1 for next release38 private int tileSize = -1; 41 39 42 40 /** mapping <header key, metadata key> */
Note:
See TracChangeset
for help on using the changeset viewer.