Changeset 9101 in josm


Ignore:
Timestamp:
2015-12-11T18:43:13+01:00 (4 years ago)
Author:
bastiK
Message:

fixed #12155 - North-Pole-Node seems to destroy the Map in JOSM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/BoundingXYVisitor.java

    r8927 r9101  
    136136        LatLon maxLatlon = Main.getProjection().eastNorth2latlon(bounds.getMax());
    137137        bounds = new ProjectionBounds(
    138                 Main.getProjection().latlon2eastNorth(new LatLon(minLatlon.lat() - enlargeDegree, minLatlon.lon() - enlargeDegree)),
    139                 Main.getProjection().latlon2eastNorth(new LatLon(maxLatlon.lat() + enlargeDegree, maxLatlon.lon() + enlargeDegree)));
     138                Main.getProjection().latlon2eastNorth(new LatLon(
     139                        Math.max(-90, minLatlon.lat() - enlargeDegree),
     140                        Math.max(-180, minLatlon.lon() - enlargeDegree))),
     141                Main.getProjection().latlon2eastNorth(new LatLon(
     142                        Math.min(90, maxLatlon.lat() + enlargeDegree),
     143                        Math.min(180, maxLatlon.lon() + enlargeDegree))));
    140144    }
    141145
Note: See TracChangeset for help on using the changeset viewer.