Changeset 9430 in josm


Ignore:
Timestamp:
2016-01-13T03:32:00+01:00 (6 years ago)
Author:
Don-vip
Message:

add basic unit tests for tile source layers

Location:
trunk
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java

    r9180 r9430  
    8989 * Base abstract class that supports displaying images provided by TileSource. It might be TMS source, WMS or WMTS
    9090 *
    91  * It implements all standard functions of tilesource based layers: autozoom,  tile reloads, layer saving, loading,etc.
     91 * It implements all standard functions of tilesource based layers: autozoom, tile reloads, layer saving, loading,etc.
    9292 *
    9393 * @author Upliner
     
    9797 */
    9898public abstract class AbstractTileSourceLayer extends ImageryLayer implements ImageObserver, TileLoaderListener, ZoomChangeListener {
    99     private static final String PREFERENCE_PREFIX   = "imagery.generic";
     99    private static final String PREFERENCE_PREFIX = "imagery.generic";
    100100
    101101    /** maximum zoom level supported */
  • trunk/src/org/openstreetmap/josm/gui/layer/TMSLayer.java

    r8714 r9430  
    5252    }
    5353
    54 
    5554    /**
    5655     * Creates and returns a new TileSource instance depending on the {@link ImageryType}
     
    7675        });
    7776    }
    78 
    79     /**
    80      * Adds a context menu to the mapView.
    81      */
    8277
    8378    @Override
     
    126121            info.setAttribution(t);
    127122            return t;
    128         } else if (info.getImageryType() == ImageryType.BING)
     123        } else if (info.getImageryType() == ImageryType.BING) {
    129124            return new CachedAttributionBingAerialTileSource(info, attributionLoadedTask);
    130         else if (info.getImageryType() == ImageryType.SCANEX) {
     125        } else if (info.getImageryType() == ImageryType.SCANEX) {
    131126            return new ScanexTileSource(info);
    132127        }
     
    150145        return AbstractCachedTileSourceLayer.getCache(CACHE_REGION_NAME);
    151146    }
    152 
    153147}
  • trunk/src/org/openstreetmap/josm/gui/layer/WMSLayer.java

    r9135 r9430  
    6161        this.supportedProjections = new TreeSet<>(info.getServerProjections());
    6262        this.autoZoom = PROP_DEFAULT_AUTOZOOM.get();
    63 
    6463    }
    6564
  • trunk/src/org/openstreetmap/josm/gui/layer/WMTSLayer.java

    r8752 r9430  
    3737    public static final BooleanProperty PROP_DEFAULT_AUTOZOOM = new BooleanProperty("imagery.wmts.default_autozoom", true);
    3838    private static final String CACHE_REGION_NAME = "WMTS";
    39 
    4039
    4140    /**
Note: See TracChangeset for help on using the changeset viewer.