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 java.lang.String |
CACHE_REGION_NAME |
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, ICON_SIZE, 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() |
protected java.lang.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,
java.lang.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.
|
java.lang.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 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
public TMSLayer(ImageryInfo info)
info
- description of the layerprotected AbstractTMSTileSource 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
info
- imagery infojava.lang.IllegalArgumentException
- if url from imagery info is null or invalidpublic final boolean isProjectionSupported(Projection proj)
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 AbstractTMSTileSource 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
protected java.lang.String getCacheName()
getCacheName
in class AbstractCachedTileSourceLayer
public static org.apache.commons.jcs.access.CacheAccess<java.lang.String,BufferedImageCacheEntry> getCache()