Changeset 2327 in josm for trunk/src/org/openstreetmap/josm/gui/download/TileSelection.java
- Timestamp:
- 2009-10-27T01:21:32+01:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/download/TileSelection.java
r1169 r2327 16 16 import javax.swing.SpinnerNumberModel; 17 17 18 import org.openstreetmap.josm.data.Bounds; 19 import org.openstreetmap.josm.data.coor.LatLon; 18 20 import org.openstreetmap.josm.tools.GBC; 19 21 /** … … 65 67 if (toy<fromy) { int i = fromy; fromy=toy; toy=i; } 66 68 67 gui.minlat = tileYToLat(zoomlvl, toy+1);68 gui.minlon = tileXToLon(zoomlvl, fromx);69 gui.maxlat = tileYToLat(zoomlvl, fromy);70 gui.maxlon = tileXToLon(zoomlvl, tox+1);71 gui.boundingBoxChanged( TileSelection.this);69 Bounds b = new Bounds( 70 new LatLon(tileYToLat(zoomlvl, toy + 1), tileXToLon(zoomlvl, fromx)), 71 new LatLon(tileYToLat(zoomlvl, fromy), tileXToLon(zoomlvl, tox + 1)) 72 ); 73 gui.boundingBoxChanged(b, TileSelection.this); 72 74 //repaint(); 73 75 } catch (NumberFormatException x) { … … 82 84 } 83 85 84 gui. tabpane.addTab(tr("Tile Numbers"), smpanel);86 gui.addDownloadAreaSelector(smpanel, tr("Tile Numbers")); 85 87 } 86 88 … … 94 96 private void updateBboxFields(DownloadDialog gui) { 95 97 int z = ((Integer) tileZ.getValue()).intValue(); 96 tileX0.setText(Integer.toString(lonToTileX(z, gui.minlon))); 97 tileX1.setText(Integer.toString(lonToTileX(z, gui.maxlon-.00001))); 98 tileY0.setText(Integer.toString(latToTileY(z, gui.maxlat-.00001))); 99 tileY1.setText(Integer.toString(latToTileY(z, gui.minlat))); 98 Bounds b = gui.getSelectedDownloadArea(); 99 if (b == null) 100 return; 101 tileX0.setText(Integer.toString(lonToTileX(z, b.getMin().lon()))); 102 tileX1.setText(Integer.toString(lonToTileX(z, b.getMax().lon()-.00001))); 103 tileY0.setText(Integer.toString(latToTileY(z, b.getMax().lat()-.00001))); 104 tileY1.setText(Integer.toString(latToTileY(z, b.getMin().lat()))); 100 105 } 101 106
Note:
See TracChangeset
for help on using the changeset viewer.