public class TMSLayer extends AbstractCachedTileSourceLayer
AbstractTileSourceLayer.PrecacheTask
ImageryLayer.ApplyOffsetAction, ImageryLayer.GammaImageProcessor, ImageryLayer.OffsetAction
Layer.LayerAction, Layer.LayerGpxExportAction, Layer.LayerSaveAction, Layer.LayerSaveAsAction, Layer.MultiLayerAction, Layer.SeparatorLayerAction
Modifier and Type | Field and Description |
---|---|
private static String |
CACHE_REGION_NAME |
private static 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, ICON_SIZE, NAME_PROP, OPACITY_PROP, propertyChangeSupport, VISIBLE_PROP
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
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<String,BufferedImageCacheEntry> |
getCache() |
protected String |
getCacheName() |
protected Class<? extends TileLoader> |
getTileLoaderClass() |
protected AbstractTMSTileSource |
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 AbstractTMSTileSource |
getTileSourceStatic(ImageryInfo info,
Runnable attributionLoadedTask)
Creates and returns a new TileSource instance depending on the
ImageryInfo.ImageryType
of the passed ImageryInfo object. |
boolean |
isProjectionSupported(Projection proj)
Adds a context menu to the mapView.
|
String |
nameSupportedProjections()
Specify user information about projections
|
getCache, getDiskCacheSize, getTileLoaderFactory, getTileLoaderFactory, setTileLoaderFactory
checkMaxZoomLvl, checkMinZoomLvl, clearTileCache, createAndOpenSaveFileChooser, decreaseZoomLevel, downloadAreaToCache, estimateMemoryUsage, estimateTileCacheSize, getBestZoom, getHeaders, 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, isVisible, onPostLoadFromFile, projectionChanged, removePropertyChangeListener, setAssociatedFile, setBackgroundLayer, setFilterStateChanged, setName, setOpacity, setVisible, toggleVisible
private static final String CACHE_REGION_NAME
private static final 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
public TMSLayer(ImageryInfo info)
info
- description of the layerprotected AbstractTMSTileSource getTileSource(ImageryInfo info) throws 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
info
- imagery infoIllegalArgumentException
- if url from imagery info is null or invalidpublic final boolean isProjectionSupported(Projection proj)
isProjectionSupported
in class Layer
proj
- projectionpublic final String nameSupportedProjections()
Layer
nameSupportedProjections
in class Layer
public static AbstractTMSTileSource getTileSourceStatic(ImageryInfo info) throws 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 infoIllegalArgumentException
- if url from imagery info is null or invalidpublic static AbstractTMSTileSource getTileSourceStatic(ImageryInfo info, Runnable attributionLoadedTask) throws 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 happenIllegalArgumentException
- if url from imagery info is null or invalidprotected Class<? extends TileLoader> getTileLoaderClass()
getTileLoaderClass
in class AbstractCachedTileSourceLayer
protected String getCacheName()
getCacheName
in class AbstractCachedTileSourceLayer
public static org.apache.commons.jcs.access.CacheAccess<String,BufferedImageCacheEntry> getCache()