Changeset 24706 in osm for applications/viewer/jmapviewer


Ignore:
Timestamp:
2010-12-12T01:35:34+01:00 (14 years ago)
Author:
upliner
Message:

prepare to include imagery into JOSM and Bing into jmapviewer

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  
    3232import org.openstreetmap.gui.jmapviewer.interfaces.TileLoaderListener;
    3333import org.openstreetmap.gui.jmapviewer.interfaces.TileSource;
    34 import org.openstreetmap.josm.data.coor.LatLon;
    3534
    3635/**
     
    774773        Coordinate topLeft = getPosition(0,0);
    775774        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);
    779776        Rectangle2D stringBounds = g.getFontMetrics().getStringBounds(attributionText, g);
    780777        {
  • applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/OsmTileSource.java

    r24489 r24706  
    66
    77import org.openstreetmap.gui.jmapviewer.interfaces.TileSource;
    8 import org.openstreetmap.josm.data.coor.LatLon;
    98
    109public class OsmTileSource {
     
    8584        }
    8685
    87         public String getAttributionText(int zoom, LatLon topLeft, LatLon botRight) {
     86        public String getAttributionText(int zoom, Coordinate topLeft, Coordinate botRight) {
    8887            return "CC-BY-SA OpenStreetMap and Contributors";
    8988        }
  • applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/TileSource.java

    r24643 r24706  
    33import java.awt.Image;
    44
     5import org.openstreetmap.gui.jmapviewer.Coordinate;
    56import org.openstreetmap.gui.jmapviewer.JMapViewer;
    6 import org.openstreetmap.josm.data.coor.LatLon;
    77
    88//License: GPL. Copyright 2008 by Jan Peter Stotz
     
    101101    public boolean requiresAttribution();
    102102
    103     // FIXME: JMapViewer shouldn't reference JOSM classes.
    104103    /**
    105104     * @param zoom The optional zoom level for the view.
     
    108107     * @return Attribution text for the image source.
    109108     */
    110     public String getAttributionText(int zoom, LatLon topLeft, LatLon botRight);
     109    public String getAttributionText(int zoom, Coordinate topLeft, Coordinate botRight);
    111110
    112111    /**
Note: See TracChangeset for help on using the changeset viewer.