Changeset 31371 in osm


Ignore:
Timestamp:
2015-07-13T00:10:52+02:00 (9 years ago)
Author:
wiktorn
Message:

TileSource:

  • added method - getTileId that returns unique identifier for the tile, that should not collide with other tile sources
  • added JavaDocs

JCSCacheManager:

  • moved from object count limit to object size limit
  • fixed bug with unnecessary re-creation of auxilary cache, that could result in cache corruption/loss of current cache data

CachedTileLoaderFactory, WMSCachedTileLoader, TMSCachedTileLoader

  • un-abstract CachedTileLoaderFactory, use reflection to create TileLoaders
  • adjust constructors

TMSCachedTileLoader, AbstractCachedTileSourceLayer:

  • move cache related settings to AbstractCachedTileSourceLayer
  • move cache instation to AbstractCachedTileSourceLayer
  • make "flush tile cache" command clear only one tile source

TMSCachedTileLoaderJob:

  • make "flush tile cache" command clear only one tile source
  • reorder methods

TemplatedWMSTileSource:

  • java docs
  • inline of private methods: getTileXMax, getTileYMax
  • fix sonar issues
  • make WMS layer zoom levels closer to TMS (addresses: #11459)

WMTSTileSource:

  • fix Sonar issues
  • use topLeftCorner in X/Y tile max calculations instead of world bounds (fixes issues with WMTS-es, for which topLeftCorner lies outside projection world bounds)

AbstractTileSourceLayer:

  • draw warning, when min-zoom-level is set, and tiles are not loaded due to too many tiles on screen

TMSLayer, WMSLayer, WMTSLayer:

  • expose access to cache object for ImageryPreferences

CacheContentsPanel:

  • add panel for managing cache regions and tile sources within the regions

CommonSettingsPanel, TMSSettingsPanel:

  • move settings common to all imagery layers from TMSSettingsPanel to CommonSettingsPanel
Location:
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer
Files:
2 edited

Legend:

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

    r31310 r31371  
    9797
    9898    /**
     99     * Creates tile identifier that is unique among all tile sources, but the same tile will always
     100     * get the same identifier. Used for creation of cache key.
     101     *
     102     * @param zoom
     103     * @param tilex
     104     * @param tiley
     105     * @return tile identifier
     106     */
     107    String getTileId(int zoom, int tilex, int tiley);
     108
     109    /**
    99110     * Specifies how large each tile is.
    100111     * @return The size of a single tile in pixels. -1 if default size should be used
     
    145156    public Point latLonToXY(double lat, double lon, int zoom);
    146157
     158    /**
     159     * @param point
     160     * @param zoom
     161     * @return transforms longitude and latitude to pixel space (as if all tiles at specified zoom level where joined)
     162     */
    147163    public Point latLonToXY(ICoordinate point, int zoom);
    148164
     
    172188    public ICoordinate XYToLatLon(Point point, int zoom);
    173189
     190    /**
     191     *
     192     * @param x
     193     * @param y
     194     * @param zoom
     195     * @return WGS84 Coordinates of given point
     196     */
    174197    public ICoordinate XYToLatLon(int x, int y, int zoom);
    175198
     
    200223    public TileXY latLonToTileXY(double lat, double lon, int zoom);
    201224
     225    /**
     226     *
     227     * @param point
     228     * @param zoom
     229     * @return x and y tile indices
     230     */
    202231    public TileXY latLonToTileXY(ICoordinate point, int zoom);
    203232
     
    227256    public ICoordinate tileXYToLatLon(TileXY xy, int zoom);
    228257
     258    /**
     259     *
     260     * @param tile
     261     * @return WGS84 coordinates of given tile
     262     */
    229263    public ICoordinate tileXYToLatLon(Tile tile);
    230264
     265    /**
     266     *
     267     * @param x
     268     * @param y
     269     * @param zoom
     270     * @return WGS84 coordinates of given tile
     271     */
    231272    public ICoordinate tileXYToLatLon(int x, int y, int zoom);
    232273
  • applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/AbstractTMSTileSource.java

    r31339 r31371  
    278278    }
    279279
     280    @Override
     281    public String getTileId(int zoom, int tilex, int tiley) {
     282        return this.baseUrl + "/" + zoom + "/" + tilex + "/" + tiley;
     283    }
     284
    280285    private int getTileMax(int zoom) {
    281286        return (int)Math.pow(2.0, zoom) - 1;
Note: See TracChangeset for help on using the changeset viewer.