Changeset 78 in josm for src/org/openstreetmap/josm/gui/MapView.java
- Timestamp:
- 2006-04-01T13:01:41+02:00 (20 years ago)
- File:
-
- 1 edited
-
src/org/openstreetmap/josm/gui/MapView.java (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/org/openstreetmap/josm/gui/MapView.java
r77 r78 17 17 import org.openstreetmap.josm.data.osm.DataSet; 18 18 import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor; 19 import org.openstreetmap.josm.data.projection.Projection; 19 20 import org.openstreetmap.josm.gui.layer.Layer; 20 21 import org.openstreetmap.josm.gui.layer.OsmDataLayer; … … 214 215 215 216 if (v.min == null || v.max == null) { 216 // no bounds means standard scale and center 217 center = Main.proj.latlon2eastNorth(new LatLon(51.526447, -0.14746371)); 218 scale = 10; 217 // no bounds means whole world 218 center = getProjection().latlon2eastNorth(new LatLon(0,0)); 219 EastNorth world = getProjection().latlon2eastNorth(new LatLon(Projection.MAX_LAT,Projection.MAX_LON)); 220 double scaleX = world.east()*2/w; 221 double scaleY = world.north()*2/h; 222 scale = Math.max(scaleX, scaleY); // minimum scale to see all of the screen 223 219 224 } else { 220 225 center = new EastNorth(v.min.east()/2+v.max.east()/2, v.min.north()/2+v.max.north()/2);
Note:
See TracChangeset
for help on using the changeset viewer.
