Ignore:
Timestamp:
2015-08-01T23:17:41+02:00 (9 years ago)
Author:
donvip
Message:

proper JOSM/JMapViewer integration

Location:
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/JMapViewer.java

    r31430 r31432  
    4444public class JMapViewer extends JPanel implements TileLoaderListener {
    4545
    46     public static final boolean DEBUG = false;
     46    public static boolean debug = false;
    4747
    4848    /**
  • applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/OsmTileLoader.java

    r31430 r31432  
    144144            } catch (NumberFormatException e) {
    145145                // ignore malformed Cache-Control headers
    146                 if (JMapViewer.DEBUG) {
     146                if (JMapViewer.debug) {
    147147                    System.err.println(e.getMessage());
    148148                }
  • applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/BingAerialTileSource.java

    r31430 r31432  
    196196                for (int i = 0; i < 5 && getAttribution() == null; i++) {
    197197                    // Makes sure attribution is loaded
    198                     if (JMapViewer.DEBUG) {
     198                    if (JMapViewer.debug) {
    199199                        System.out.println("Bing attribution attempt " + (i+1));
    200200                    }
  • applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/TileSourceInfo.java

    r31431 r31432  
    1313public class TileSourceInfo {
    1414    /** id for this imagery entry, optional at the moment */
    15     protected final String id;
     15    protected String id;
    1616
    1717    /** URL of the imagery service */
    18     protected final String url;
     18    protected String url;
    1919
    2020    /** name of the imagery layer */
    21     protected final String name;
     21    protected String name;
    2222
    2323    /** headers meaning, that there is no tile at this zoom level */
     
    8585
    8686    /**
    87      * Request ID of the tile source
     87     * Request ID of the tile source. Id can be null. This gets the configured id as is.
     88     * Due to a user error, this may not be unique.
    8889     * @return id of the tile source
    8990     */
     
    133134
    134135    /**
     136     * Request metadata headers
     137     * @return mapping &lt;HTTP header name, Metadata key name&gt; for copying HTTP headers to Tile metadata
     138     * @since 31125
     139     */
     140    public Map<String, String> getMetadataHeaders() {
     141        return metadataHeaders;
     142    }
     143
     144    /**
    135145     * Sets the tile size provided by this tile source
    136146     * @param tileSize tile size in pixels
    137147     */
    138     public void setTileSize(int tileSize) {
     148    public final void setTileSize(int tileSize) {
    139149        if (tileSize == 0 || tileSize < -1) {
    140150            throw new AssertionError("Invalid tile size: " + tileSize);
     
    144154
    145155    /**
    146      *
    147      * @return mapping &lt;HTTP header name, Metadata key name&gt; for copying HTTP headers to Tile metadata
    148      * @since 31125
     156     * Sets the tile URL.
     157     * @param url tile URL
    149158     */
    150     public Map<String, String> getMetadataHeaders() {
    151         return metadataHeaders;
     159    public final void setUrl(String url) {
     160        this.url = url;
     161    }
     162
     163    /**
     164     * Sets the tile name.
     165     * @param name tile name
     166     */
     167    public final void setName(String name) {
     168        this.name = name;
     169    }
     170
     171    /**
     172     * Sets the tile id.
     173     * @param id tile id
     174     */
     175    public final void setId(String id) {
     176        this.id = id;
    152177    }
    153178}
Note: See TracChangeset for help on using the changeset viewer.