Ignore:
Timestamp:
2015-05-14T13:25:43+02:00 (9 years ago)
Author:
stoecker
Message:

see #josm11419 - support different tile sizes, patch mainly by wiktorn

File:
1 edited

Legend:

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

    r31122 r31125  
    33
    44import java.util.Map;
     5
     6import org.openstreetmap.gui.jmapviewer.OsmMercator;
    57
    68/**
     
    2830    protected String cookies;
    2931
     32    /** tile size of the displayed tiles */
     33    private int tileSize = OsmMercator.DEFAUL_TILE_SIZE;
    3034
    3135    /**
     
    5862
    5963    /**
    60      *
     64     * Request name of the tile source
    6165     * @return name of the tile source
    6266     */
     
    6670
    6771    /**
    68      *
     72     * Request URL of the tile source
    6973     * @return url of the tile source
    7074     */
     
    7478
    7579    /**
    76      *
     80     * Request header information for empty tiles for servers delivering such tile types
    7781     * @return map of headers, that when set, means that this is "no tile at this zoom level" situation
    7882     */
     
    8286
    8387    /**
    84      *
     88     * Request supported minimum zoom level
    8589     * @return minimum zoom level supported by tile source
    8690     */
     
    9094
    9195    /**
    92      *
     96     * Request supported maximum zoom level
    9397     * @return maximum zoom level supported by tile source
    9498     */
     
    98102
    99103    /**
    100      *
     104     * Request cookies to be sent together with request
    101105     * @return cookies to be sent along with request to tile source
    102106     */
     
    105109    }
    106110
     111    /**
     112     * Request tile size of this tile source
     113     * @return tile size provided by this tile source
     114     */
     115    public int getTileSize() {
     116        return tileSize;
     117    }
     118
     119    /**
     120     * Sets the tile size provided by this tile source
     121     * @param tileSize
     122     */
     123    public void setTileSize(int tileSize) {
     124        if (tileSize <= 0) {
     125            throw new AssertionError("Invalid tile size: " + tileSize);
     126        }
     127        this.tileSize = tileSize;
     128    }
    107129}
Note: See TracChangeset for help on using the changeset viewer.