- Timestamp:
- 2009-11-19T10:00:15+01:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/actions
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java
r2343 r2477 2 2 package org.openstreetmap.josm.actions; 3 3 4 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 4 5 import static org.openstreetmap.josm.tools.I18n.marktr; 5 import static org.openstreetmap.josm.gui.help.HelpUtil.ht;6 6 import static org.openstreetmap.josm.tools.I18n.tr; 7 7 … … 15 15 16 16 import org.openstreetmap.josm.Main; 17 import org.openstreetmap.josm.data. coor.LatLon;17 import org.openstreetmap.josm.data.Bounds; 18 18 import org.openstreetmap.josm.data.osm.OsmPrimitive; 19 19 import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor; … … 69 69 }else if (mode.equals("download")) { 70 70 putValue("help", ht("/Action/ZoomToDownload")); 71 } 71 } 72 72 } 73 73 … … 151 151 if (Main.pref.hasKey("osm-download.bounds")) { 152 152 try { 153 String bounds[] = Main.pref.get("osm-download.bounds").split(";"); 154 double minlat = Double.parseDouble(bounds[0]); 155 double minlon = Double.parseDouble(bounds[1]); 156 double maxlat = Double.parseDouble(bounds[2]); 157 double maxlon = Double.parseDouble(bounds[3]); 158 159 v.visit(Main.proj.latlon2eastNorth(new LatLon(minlat, minlon))); 160 v.visit(Main.proj.latlon2eastNorth(new LatLon(maxlat, maxlon))); 161 } 162 catch (Exception e) { 153 v.visit(new Bounds(Main.pref.get("osm-download.bounds"), ";")); 154 } catch (Exception e) { 163 155 e.printStackTrace(); 164 156 } -
trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTask.java
r2434 r2477 14 14 import org.openstreetmap.josm.data.osm.DataSet; 15 15 import org.openstreetmap.josm.data.osm.DataSource; 16 import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor; 16 17 import org.openstreetmap.josm.gui.PleaseWaitRunnable; 17 18 import org.openstreetmap.josm.gui.layer.Layer; … … 31 32 private static final Logger logger = Logger.getLogger(DownloadOsmTask.class.getName()); 32 33 33 private staticBounds currentBounds;34 private Bounds currentBounds; 34 35 private DataSet downloadedData; 35 36 private DownloadTask downloadTask; … … 157 158 } 158 159 target.mergeFrom(dataSet); 160 BoundingXYVisitor v = new BoundingXYVisitor(); 161 v.visit(currentBounds); 162 Main.map.mapView.recalculateCenterScale(v); 159 163 target.onPostDownloadFromServer(); 160 164 }
Note:
See TracChangeset
for help on using the changeset viewer.