Changeset 31339 in osm for applications


Ignore:
Timestamp:
2015-07-04T22:52:49+02:00 (9 years ago)
Author:
wiktorn
Message:

Basic WMTS support.

  • added information about units and to_meter to EPSG projection definitions (needed for WMTS)
  • added WMTSTileSource and WMTSLayer classes
  • a bit of cleanup of AbstractTileSourceLayer and align so it will work properly with WMTS tile definitions
  • added Imagery Preferences panel for WMTS and icon for button
  • added removal of wms: / tms: / wmts: prefix, if user will paste them into the field
  • CachedFile - added possibility to send custom headers with request
  • added support for unit and to_meter in CustomProjection
  • AbstractTMSTileSource cleanups (change of Coordinate to ICoordinate)
  • moved JCSCachedTileLoaderJob.read() to Utils

Addresses: #josm10623

Tested with Polish WMTS service proivders, Walonnie needs still some debugging, as it is not working right now.

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

Legend:

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

    r31301 r31339  
    3838     */
    3939    public int getYIndex() {
    40         return y < 0 ? (int) Math.ceil(x) : (int) Math.floor(y);
     40        return y < 0 ? (int) Math.ceil(y) : (int) Math.floor(y);
    4141    }
    4242
  • applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/AbstractTMSTileSource.java

    r31310 r31339  
    161161
    162162    @Override
    163     public Coordinate XYToLatLon(Point point, int zoom) {
     163    public ICoordinate XYToLatLon(Point point, int zoom) {
    164164        return XYToLatLon(point.x, point.y, zoom);
    165165    }
    166166
    167167    @Override
    168     public Coordinate XYToLatLon(int x, int y, int zoom) {
     168    public ICoordinate XYToLatLon(int x, int y, int zoom) {
    169169        return new Coordinate(
    170170                osmMercator.YToLat(y, zoom),
     
    207207
    208208    @Override
    209     public Coordinate tileXYToLatLon(TileXY xy, int zoom) {
     209    public ICoordinate tileXYToLatLon(TileXY xy, int zoom) {
    210210        return tileXYToLatLon(xy.getXIndex(), xy.getYIndex(), zoom);
    211211    }
    212212
    213213    @Override
    214     public Coordinate tileXYToLatLon(Tile tile) {
     214    public ICoordinate tileXYToLatLon(Tile tile) {
    215215        return tileXYToLatLon(tile.getXtile(), tile.getYtile(), tile.getZoom());
    216216    }
    217217
    218218    @Override
    219     public Coordinate tileXYToLatLon(int x, int y, int zoom) {
     219    public ICoordinate tileXYToLatLon(int x, int y, int zoom) {
    220220        return new Coordinate(
    221221                osmMercator.YToLat(y * tileSize, zoom),
Note: See TracChangeset for help on using the changeset viewer.