Changeset 24706 in osm for applications/viewer/jmapviewer
- Timestamp:
- 2010-12-12T01:35:34+01:00 (14 years ago)
- Location:
- applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer
- Files:
-
- 4 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/JMapViewer.java
r24643 r24706 32 32 import org.openstreetmap.gui.jmapviewer.interfaces.TileLoaderListener; 33 33 import org.openstreetmap.gui.jmapviewer.interfaces.TileSource; 34 import org.openstreetmap.josm.data.coor.LatLon;35 34 36 35 /** … … 774 773 Coordinate topLeft = getPosition(0,0); 775 774 Coordinate bottomRight = getPosition(getWidth(),getHeight()); 776 String attributionText = tileSource.getAttributionText(zoom, 777 new LatLon(topLeft.getLat(),topLeft.getLon()), 778 new LatLon(bottomRight.getLat(),bottomRight.getLon())); 775 String attributionText = tileSource.getAttributionText(zoom, topLeft, bottomRight); 779 776 Rectangle2D stringBounds = g.getFontMetrics().getStringBounds(attributionText, g); 780 777 { -
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/OsmTileSource.java
r24489 r24706 6 6 7 7 import org.openstreetmap.gui.jmapviewer.interfaces.TileSource; 8 import org.openstreetmap.josm.data.coor.LatLon;9 8 10 9 public class OsmTileSource { … … 85 84 } 86 85 87 public String getAttributionText(int zoom, LatLon topLeft, LatLonbotRight) {86 public String getAttributionText(int zoom, Coordinate topLeft, Coordinate botRight) { 88 87 return "CC-BY-SA OpenStreetMap and Contributors"; 89 88 } -
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/TileSource.java
r24643 r24706 3 3 import java.awt.Image; 4 4 5 import org.openstreetmap.gui.jmapviewer.Coordinate; 5 6 import org.openstreetmap.gui.jmapviewer.JMapViewer; 6 import org.openstreetmap.josm.data.coor.LatLon;7 7 8 8 //License: GPL. Copyright 2008 by Jan Peter Stotz … … 101 101 public boolean requiresAttribution(); 102 102 103 // FIXME: JMapViewer shouldn't reference JOSM classes.104 103 /** 105 104 * @param zoom The optional zoom level for the view. … … 108 107 * @return Attribution text for the image source. 109 108 */ 110 public String getAttributionText(int zoom, LatLon topLeft, LatLonbotRight);109 public String getAttributionText(int zoom, Coordinate topLeft, Coordinate botRight); 111 110 112 111 /**
Note:
See TracChangeset
for help on using the changeset viewer.