public class TMSLayer extends AbstractCachedTileSourceLayer<TMSTileSource> implements NativeScaleLayer
AbstractTileSourceLayer.PrecacheTask, AbstractTileSourceLayer.TileSourceLayerPopup
ImageryLayer.ApplyOffsetAction, ImageryLayer.GammaImageProcessor, ImageryLayer.OffsetAction
Layer.LayerAction, Layer.LayerGpxExportAction, Layer.LayerSaveAction, Layer.LayerSaveAsAction, Layer.MultiLayerAction, Layer.SeparatorLayerAction
NativeScaleLayer.Scale, NativeScaleLayer.ScaleList
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
CACHE_REGION_NAME |
private static NativeScaleLayer.ScaleList |
nativeScaleList |
private static java.lang.String |
PREFERENCE_PREFIX |
static BooleanProperty |
PROP_ADD_TO_SLIPPYMAP_CHOOSER
shall TMS layers be added to download dialog
|
static IntegerProperty |
PROP_MAX_ZOOM_LVL
maximum zoom level for TMS layer
|
static IntegerProperty |
PROP_MIN_ZOOM_LVL
minimum zoom level for TMS layer
|
MAX_DISK_CACHE_SIZE
autoLoad, autoZoom, currentZoomLevel, MAX_ZOOM, MIN_ZOOM, PROP_DEFAULT_AUTOLOAD, PROP_DEFAULT_AUTOZOOM, PROP_DEFAULT_SHOWERRORS, showErrors, tileCache, tileLoader, tileSource, ZOOM_OFFSET
dx, dy, gammaImageProcessor, icon, info, PROP_FADE_AMOUNT, PROP_FADE_COLOR, PROP_SHARPEN_LEVEL
FILTER_STATE_PROP, NAME_PROP, OPACITY_PROP, propertyChangeSupport, VISIBLE_PROP
Constructor and Description |
---|
TMSLayer(ImageryInfo info)
Create a layer based on ImageryInfo
|
Modifier and Type | Method and Description |
---|---|
static org.apache.commons.jcs.access.CacheAccess<java.lang.String,BufferedImageCacheEntry> |
getCache() |
protected java.lang.String |
getCacheName() |
NativeScaleLayer.ScaleList |
getNativeScales()
Get native scales of this layer.
|
protected java.lang.Class<? extends TileLoader> |
getTileLoaderClass() |
protected TMSTileSource |
getTileSource(ImageryInfo info)
Creates and returns a new TileSource instance depending on the
ImageryInfo.ImageryType
of the passed ImageryInfo object. |
static AbstractTMSTileSource |
getTileSourceStatic(ImageryInfo info)
Creates and returns a new TileSource instance depending on the
ImageryInfo.ImageryType
of the passed ImageryInfo object. |
static TMSTileSource |
getTileSourceStatic(ImageryInfo info,
java.lang.Runnable attributionLoadedTask)
Creates and returns a new TileSource instance depending on the
ImageryInfo.ImageryType
of the passed ImageryInfo object. |
private static NativeScaleLayer.ScaleList |
initNativeScaleList() |
boolean |
isProjectionSupported(Projection proj)
allows to check whether a projection is supported or not
|
java.lang.String |
nameSupportedProjections()
Specify user information about projections
|
getCache, getDiskCacheSize, getTileLoaderFactory, getTileLoaderFactory, setTileLoaderFactory
checkMaxZoomLvl, checkMinZoomLvl, clearTileCache, createAndOpenSaveFileChooser, decreaseZoomLevel, downloadAreaToCache, estimateMemoryUsage, estimateTileCacheSize, getBestZoom, getCommonEntries, getHeaders, getLayerListEntries, getMaxZoomLvl, getMaxZoomLvl, getMenuEntries, getMinZoomLvl, getMinZoomLvl, getToolTipText, hookUpMapView, imageUpdate, increaseZoomLevel, initTileSource, isChanged, isSavable, loadAllErrorTiles, loadAllTiles, paint, redraw, setGamma, setMaxZoomLvl, setMinZoomLvl, setOffset, setZoomLevel, tileLoadingFinished, visitBoundingBox, zoomChanged, zoomDecreaseAllowed, zoomIncreaseAllowed
addImageProcessor, applyImageProcessors, create, createImageProcessor, createSharpener, destroy, displace, drawErrorTile, getDx, getDy, getFadeColor, getFadeColorWithAlpha, getGamma, getIcon, getImageProcessors, getInfo, getInfoComponent, getOffsetMenuItem, getOffsetMenuItem, getPPD, isMergable, mergeFrom, removeImageProcessor
addPropertyChangeListener, checkSaveConditions, fireFilterStateChanged, fireOpacityChanged, fireVisibleChanged, getAssociatedFile, getColor, getName, getOpacity, isBackgroundLayer, isInfoResizable, isRenamed, isVisible, onPostLoadFromFile, projectionChanged, removePropertyChangeListener, rename, setAssociatedFile, setBackgroundLayer, setFilterStateChanged, setName, setOpacity, setVisible, toggleVisible
private static final java.lang.String CACHE_REGION_NAME
private static final java.lang.String PREFERENCE_PREFIX
public static final IntegerProperty PROP_MIN_ZOOM_LVL
public static final IntegerProperty PROP_MAX_ZOOM_LVL
public static final BooleanProperty PROP_ADD_TO_SLIPPYMAP_CHOOSER
private static final NativeScaleLayer.ScaleList nativeScaleList
public TMSLayer(ImageryInfo info)
info
- description of the layerprotected TMSTileSource getTileSource(ImageryInfo info) throws java.lang.IllegalArgumentException
ImageryInfo.ImageryType
of the passed ImageryInfo object.
If no appropriate TileSource is found, null is returned.
Currently supported ImageryType are ImageryInfo.ImageryType.TMS
,
ImageryInfo.ImageryType.BING
, ImageryInfo.ImageryType.SCANEX
.getTileSource
in class AbstractTileSourceLayer<TMSTileSource>
info
- imagery infojava.lang.IllegalArgumentException
- if url from imagery info is null or invalidpublic final boolean isProjectionSupported(Projection proj)
Layer
isProjectionSupported
in class Layer
proj
- projectionpublic final java.lang.String nameSupportedProjections()
Layer
nameSupportedProjections
in class Layer
public static AbstractTMSTileSource getTileSourceStatic(ImageryInfo info) throws java.lang.IllegalArgumentException
ImageryInfo.ImageryType
of the passed ImageryInfo object.
If no appropriate TileSource is found, null is returned.
Currently supported ImageryType are ImageryInfo.ImageryType.TMS
,
ImageryInfo.ImageryType.BING
, ImageryInfo.ImageryType.SCANEX
.info
- imagery infojava.lang.IllegalArgumentException
- if url from imagery info is null or invalidpublic static TMSTileSource getTileSourceStatic(ImageryInfo info, java.lang.Runnable attributionLoadedTask) throws java.lang.IllegalArgumentException
ImageryInfo.ImageryType
of the passed ImageryInfo object.
If no appropriate TileSource is found, null is returned.
Currently supported ImageryType are ImageryInfo.ImageryType.TMS
,
ImageryInfo.ImageryType.BING
, ImageryInfo.ImageryType.SCANEX
.info
- imagery infoattributionLoadedTask
- task to be run once attribution is loaded, might be null, if nothing special shall happenjava.lang.IllegalArgumentException
- if url from imagery info is null or invalidprotected java.lang.Class<? extends TileLoader> getTileLoaderClass()
getTileLoaderClass
in class AbstractCachedTileSourceLayer<TMSTileSource>
protected java.lang.String getCacheName()
getCacheName
in class AbstractCachedTileSourceLayer<TMSTileSource>
public static org.apache.commons.jcs.access.CacheAccess<java.lang.String,BufferedImageCacheEntry> getCache()
public NativeScaleLayer.ScaleList getNativeScales()
NativeScaleLayer
getNativeScales
in interface NativeScaleLayer
NativeScaleLayer.ScaleList
of native scalesprivate static NativeScaleLayer.ScaleList initNativeScaleList()