Changeset 33971 in osm


Ignore:
Timestamp:
2018-01-01T17:48:08+01:00 (7 years ago)
Author:
donvip
Message:

see #josm15713 - Add dirty-mode

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

Legend:

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

    r33209 r33971  
    270270    String getServerCRS();
    271271
     272    /**
     273     * Determines if this imagery supports "/dirty" mode (tile re-rendering).
     274     * @return <code>true</code> if it supports "/dirty" mode (tile re-rendering)
     275     */
     276    default boolean isDirtyMode() {
     277        return false;
     278    }
    272279}
  • applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/AbstractTMSTileSource.java

    r32113 r33971  
    3131    private final Map<String, Set<String>> noTileChecksums;
    3232    private final Map<String, String> metadataHeaders;
     33    protected boolean dirtyMode;
    3334    protected int tileSize;
    3435
     
    4849        this.noTileChecksums = info.getNoTileChecksums();
    4950        this.metadataHeaders = info.getMetadataHeaders();
     51        this.dirtyMode = info.isDirtyMode();
    5052        this.tileSize = info.getTileSize();
    5153    }
     
    236238    }
    237239
     240    @Override
     241    public boolean isDirtyMode() {
     242        return dirtyMode;
     243    }
     244
    238245    private static int getTileMax(int zoom) {
    239246        return (int) Math.pow(2.0, zoom) - 1;
  • applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/OsmTileSource.java

    r33334 r33971  
    2727        public Mapnik() {
    2828            super("Mapnik", PATTERN, "MAPNIK");
     29            dirtyMode = true;
    2930        }
    3031
  • applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/TileSourceInfo.java

    r32051 r33971  
    4141    protected Map<String, String> metadataHeaders;
    4242
     43    /** supports "/dirty" mode (tile re-rendering) */
     44    protected boolean dirtyMode;
     45
    4346    /**
    4447     * Create a TileSourceInfo class
     
    188191        this.id = id;
    189192    }
     193
     194    /**
     195     * Determines if this imagery supports "/dirty" mode (tile re-rendering).
     196     * @return <code>true</code> if it supports "/dirty" mode (tile re-rendering)
     197     */
     198    public final boolean isDirtyMode() {
     199        return dirtyMode;
     200    }
     201
     202    /**
     203     * Sets whether this imagery supports "/dirty" mode (tile re-rendering).
     204     * @param dirtyMode <code>true</code> if it supports "/dirty" mode (tile re-rendering)
     205     */
     206    public final void setDirtyMode(boolean dirtyMode) {
     207        this.dirtyMode = dirtyMode;
     208    }
    190209}
Note: See TracChangeset for help on using the changeset viewer.