Changeset 33286 in osm for applications/viewer
- Timestamp:
- 2017-05-01T16:56:02+02:00 (8 years ago)
- Location:
- applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/Coordinate.java
r31792 r33286 76 76 } 77 77 final Coordinate other = (Coordinate) obj; 78 if (!Objects.equals(this.data, other.data)) { 79 return false; 80 } 81 return true; 78 return Objects.equals(this.data, other.data); 82 79 } 83 80 } -
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/MapPolygonImpl.java
r31792 r33286 22 22 private List<? extends ICoordinate> points; 23 23 24 public MapPolygonImpl(ICoordinate 24 public MapPolygonImpl(ICoordinate... points) { 25 25 this(null, null, points); 26 26 } … … 34 34 } 35 35 36 public MapPolygonImpl(String name, ICoordinate 36 public MapPolygonImpl(String name, ICoordinate... points) { 37 37 this(null, name, points); 38 38 } … … 46 46 } 47 47 48 public MapPolygonImpl(Layer layer, String name, ICoordinate 48 public MapPolygonImpl(Layer layer, String name, ICoordinate... points) { 49 49 this(layer, name, Arrays.asList(points), getDefaultStyle()); 50 50 } -
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/Projected.java
r33285 r33286 67 67 } 68 68 final Projected other = (Projected) obj; 69 if (!Objects.equals(this.data, other.data)) { 70 return false; 71 } 72 return true; 69 return Objects.equals(this.data, other.data); 73 70 } 74 71 } -
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/Tile.java
r33219 r33286 4 4 import java.awt.Graphics; 5 5 import java.awt.Graphics2D; 6 import java.awt.Point;7 6 import java.awt.geom.AffineTransform; 8 7 import java.awt.image.BufferedImage; … … 303 302 @Override 304 303 public String toString() { 305 StringBuilder sb = new StringBuilder( "Tile ").append(key);304 StringBuilder sb = new StringBuilder(35).append("Tile ").append(key); 306 305 if (loading) { 307 306 sb.append(" [LOADING...]"); … … 352 351 if (zoom != other.zoom) 353 352 return false; 354 if (!getTileSource().equals(other.getTileSource())) { 355 return false; 356 } 357 return true; 353 return getTileSource().equals(other.getTileSource()); 358 354 } 359 355 -
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/TMSTileSource.java
r33207 r33286 91 91 double mercatorWidth = 2 * Math.PI * OsmMercator.EARTH_RADIUS; 92 92 double f = mercatorWidth * getTileSize() / osmMercator.getMaxPixels(zoom); 93 return new TileXY((p.getEast() + mercatorWidth / 2) / f 93 return new TileXY((p.getEast() + mercatorWidth / 2) / f, (-p.getNorth() + mercatorWidth / 2) / f); 94 94 } 95 95
Note:
See TracChangeset
for help on using the changeset viewer.