Changeset 3962 in josm for trunk/src


Ignore:
Timestamp:
2011-03-08T10:16:24+01:00 (14 years ago)
Author:
Upliner
Message:

fix #6049 auto-update scale factor of Mercator offset bookmarks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/imagery/OffsetBookmark.java

    r3872 r3962  
    1313import org.openstreetmap.josm.Main;
    1414import org.openstreetmap.josm.data.coor.LatLon;
     15import org.openstreetmap.josm.data.projection.Mercator;
    1516import org.openstreetmap.josm.data.projection.Projection;
     17import org.openstreetmap.josm.data.projection.ProjectionInfo;
    1618import org.openstreetmap.josm.data.projection.Projections;
    17 import org.openstreetmap.josm.data.projection.ProjectionInfo;
    1819import org.openstreetmap.josm.gui.layer.ImageryLayer;
    1920
     
    6667            this.centerX = Double.valueOf(array.get(5));
    6768            this.centerY = Double.valueOf(array.get(6));
     69        }
     70        // Mercator scale factor migration
     71        if (proj instanceof Mercator && this.dx < 1E-3 && this.dy < 1E-3) {
     72            this.dx *= 6378137;
     73            this.dy *= 6378137;
    6874        }
    6975        if (proj == null) {
Note: See TracChangeset for help on using the changeset viewer.