Changeset 31574 in osm for applications/editors/josm/plugins/ElevationProfile
- Timestamp:
- 2015-09-21T02:22:29+02:00 (9 years ago)
- Location:
- applications/editors/josm/plugins/ElevationProfile
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/ElevationProfile/build.xml
r31302 r31574 4 4 <property name="commit.message" value="[josm_elevationprofile]"/> 5 5 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 6 <property name="plugin.main.version" value="8 526"/>6 <property name="plugin.main.version" value="8772"/> 7 7 8 8 <!-- Configure these properties (replace "..." accordingly). -
applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/grid/ElevationGridLayer.java
r30876 r31574 15 15 import org.openstreetmap.gui.jmapviewer.Tile; 16 16 import org.openstreetmap.gui.jmapviewer.TileController; 17 import org.openstreetmap.gui.jmapviewer.TileXY; 17 18 import org.openstreetmap.gui.jmapviewer.interfaces.TileLoaderListener; 18 19 import org.openstreetmap.gui.jmapviewer.interfaces.TileSource; … … 87 88 } else { 88 89 // give some consolation... 89 Point topLeft = mv.getPoint( 90 new LatLon(tileSource.tileYToLat(y, ELE_ZOOM_LEVEL), 91 tileSource.tileXToLon(x, ELE_ZOOM_LEVEL))); 90 Point topLeft = mv.getPoint(new LatLon(tileSource.tileXYToLatLon(x, y, ELE_ZOOM_LEVEL))); 92 91 t.paint(g, topLeft.x, topLeft.y); 93 92 } … … 170 169 return; 171 170 172 x0 = (int)tileSource.lonToTileX(topLeft.lon(), zoom); 173 y0 = (int)tileSource.latToTileY(topLeft.lat(), zoom); 174 x1 = (int)tileSource.lonToTileX(botRight.lon(), zoom); 175 y1 = (int)tileSource.latToTileY(botRight.lat(), zoom); 171 TileXY p0 = tileSource.latLonToTileXY(topLeft.lat(), topLeft.lon(), zoom); 172 TileXY p1 = tileSource.latLonToTileXY(botRight.lat(), botRight.lon(), zoom); 173 174 x0 = p0.getXIndex(); 175 y0 = p0.getYIndex(); 176 x1 = p1.getXIndex(); 177 y1 = p1.getYIndex(); 176 178 if (x0 > x1) { 177 179 int tmp = x0; -
applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/grid/ElevationGridTile.java
r30737 r31574 126 126 */ 127 127 private Bounds tile2Bounds(final int x, final int y, final int zoom) { 128 Bounds bb = new Bounds( 129 new LatLon(source.tileYToLat(y, zoom), source.tileXToLon(x, zoom)), 130 new LatLon(source.tileYToLat(y + 1, zoom), source.tileXToLon(x + 1, zoom))); 131 132 return bb; 128 return new Bounds( 129 new LatLon(source.tileXYToLatLon(x, y, zoom)), 130 new LatLon(source.tileXYToLatLon(x + 1, y + 1, zoom))); 133 131 } 134 132 -
applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/grid/ElevationGridTileSource.java
r31302 r31574 14 14 public ElevationGridTileSource(String name) { 15 15 super(new TileSourceInfo(name, "", "eg")); 16 }17 18 @Override19 public TileUpdate getTileUpdate() {20 return TileUpdate.None;21 16 } 22 17
Note:
See TracChangeset
for help on using the changeset viewer.