Class TilesetMapProvider
- java.lang.Object
-
- com.supermap.services.components.spi.TiledMapProviderBase
-
- com.supermap.services.providers.LocalTileProviderBase
-
- com.supermap.services.providers.TilesetMapProvider
-
- All Implemented Interfaces:
- Disposable, MapProvider, ProviderContextAware, TilesetInfoAttainable
- Direct Known Subclasses:
- FastDFSTileProvider, GDPMapProvider, MongoDBTileProvider, OTSTileProvider, UGCV5TileProvider
public abstract class TilesetMapProvider extends LocalTileProviderBase implements TilesetInfoAttainable
SuperMap iServer map cache service provider.
Currently supported map cache includes: UGC non-compact 5.0 cache, FastDFS cache, MongoDB cache, SMTiles cache.
- Since:
- 7.0.1
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.supermap.services.components.spi.TiledMapProviderBase
TiledMapProviderBase.TileDataConverter, TiledMapProviderBase.TileImageDrawer, TiledMapProviderBase.TileImageParameter
-
-
Field Summary
-
Fields inherited from class com.supermap.services.providers.LocalTileProviderBase
localTileResource
-
Fields inherited from class com.supermap.services.components.spi.TiledMapProviderBase
CACHE_DIR, LINK_MARK, lock, logger, message, QUESTION_MARK, REGEX, REPLACEMENT, tilePixHeight, tilePixWidth
-
-
Constructor Summary
Constructors Constructor and Description TilesetMapProvider()TilesetMapProvider(MapProviderSetting setting)
-
Method Summary
Methods Modifier and Type Method and Description protected booleancacheEnabled()protected Point2DgetOrigin(java.lang.String mapName)Get the geographical coordinate of left upper corner of the map.OutputFormat[]getSupportImageFormat(java.lang.String mapName)Return the supported image formats.double[]getSupportResolutions(java.lang.String mapName)Returns the resolution of the current service support.
protected byte[]getTileImage(TiledMapProviderBase.TileImageParameter tileParam)TilesetInfo[]getTilesetInfos(java.lang.String mapName)Returns all the tile set information associated with the specified mapprotected voidinit(MapProviderSetting setting)Initialization function.protected java.util.Map<java.lang.String,MapParameter>initDefaultMapParameter()Initializing the default map status, a mapping object will be returned, of which the key is map name, valude is map parameter object.protected java.util.List<java.lang.String>initSupportedMapNames()Initializes the supported map list.protected abstract java.util.List<ImageTileset>initTilesets()Initializes the slice set.protected booleanisResolutionEquals(double resolution1, double resolution2)Determines if two resolutions are within the tolerance (1.0E-6)protected byte[]outputImage(MapParameter param, ImageOutputOption outputOption, double currentResolution)Output image in real time.protected voidsetMapInfoByTilesets(java.util.List<ImageTileset> tilesets)booleansupport(java.lang.String mapName, MapCapability capability)Determines whether the map supports the specified function.-
Methods inherited from class com.supermap.services.providers.LocalTileProviderBase
generateBigImage
-
Methods inherited from class com.supermap.services.components.spi.TiledMapProviderBase
checkSetting, clearCache, dispose, fillWatermark, findNearest, getDefaultMapParameter, getDefaultMapParameters, getMapImage, getMapParameter, getMapProviderSetting, getNames, getOverview, getProximalResolution, getProximalResolution, getResolutoinByScale, getResource, getResource, getTileDataConverter, getVectorStyle, measureArea, measureDistance, outputImage, outputImageToFile, outputImageToFile, queryByBounds, queryByDistance, queryByGeometry, queryBySQL, rectifyMapParameter, setDefaultMapParameter, setDefaultMapParameters, setMapProviderSetting, setProviderContext, updateMap, viewEntire
-
-
-
-
Constructor Detail
-
TilesetMapProvider
public TilesetMapProvider()
-
TilesetMapProvider
public TilesetMapProvider(MapProviderSetting setting)
-
-
Method Detail
-
getSupportResolutions
public double[] getSupportResolutions(java.lang.String mapName)
Description copied from class:TiledMapProviderBaseReturns the resolution of the current service support. If all resolutions are supported, empty is returned.
- Specified by:
getSupportResolutionsin classTiledMapProviderBase- Parameters:
mapName- The map name.- Returns:
- The resolution array.
-
getTilesetInfos
public TilesetInfo[] getTilesetInfos(java.lang.String mapName)
Description copied from interface:TilesetInfoAttainableReturns all the tile set information associated with the specified map
- Specified by:
getTilesetInfosin interfaceTilesetInfoAttainable- Returns:
-
getSupportImageFormat
public OutputFormat[] getSupportImageFormat(java.lang.String mapName)
Description copied from class:TiledMapProviderBaseReturn the supported image formats.
- Specified by:
getSupportImageFormatin classTiledMapProviderBase- Parameters:
mapName- The map name.- Returns:
- Supported image format array
-
initSupportedMapNames
protected java.util.List<java.lang.String> initSupportedMapNames()
Description copied from class:TiledMapProviderBaseInitializes the supported map list.- Specified by:
initSupportedMapNamesin classTiledMapProviderBase- Returns:
- The map name list.
-
initDefaultMapParameter
protected java.util.Map<java.lang.String,MapParameter> initDefaultMapParameter()
Description copied from class:TiledMapProviderBaseInitializing the default map status, a mapping object will be returned, of which the key is map name, valude is map parameter object.
- Specified by:
initDefaultMapParameterin classTiledMapProviderBase- Returns:
- Map status mapping. The key is the map name, and the value is the map parameter object.
-
outputImage
protected byte[] outputImage(MapParameter param, ImageOutputOption outputOption, double currentResolution)
Description copied from class:TiledMapProviderBaseOutput image in real time. It is stored in the specified path according to the map parameter.
- Overrides:
outputImagein classTiledMapProviderBase- Parameters:
param- Map statusoutputOption- Image parametercurrentResolution- Resolution
-
getTileImage
protected byte[] getTileImage(TiledMapProviderBase.TileImageParameter tileParam)
- Specified by:
getTileImagein classLocalTileProviderBase
-
getOrigin
protected Point2D getOrigin(java.lang.String mapName)
Description copied from class:TiledMapProviderBaseGet the geographical coordinate of left upper corner of the map.
- Specified by:
getOriginin classTiledMapProviderBase- Parameters:
mapName- The map name.- Returns:
- The geographical coordinate of left upper corner of the map.
-
cacheEnabled
protected boolean cacheEnabled()
- Specified by:
cacheEnabledin classTiledMapProviderBase
-
init
protected void init(MapProviderSetting setting)
Description copied from class:TiledMapProviderBaseInitialization function. This function does not carry on null judgment on parameter, but it may judge the correction of the contents.
- Overrides:
initin classTiledMapProviderBase- Parameters:
setting- The configuration object of service provider.
-
setMapInfoByTilesets
protected void setMapInfoByTilesets(java.util.List<ImageTileset> tilesets)
-
isResolutionEquals
protected boolean isResolutionEquals(double resolution1, double resolution2)Description copied from class:TiledMapProviderBaseDetermines if two resolutions are within the tolerance (1.0E-6)
- Overrides:
isResolutionEqualsin classTiledMapProviderBase- Parameters:
resolution1- doubleresolution2- double- Returns:
- Is it equal
-
support
public boolean support(java.lang.String mapName, MapCapability capability)Description copied from interface:MapProviderDetermines whether the map supports the specified function.- Specified by:
supportin interfaceMapProvider- Overrides:
supportin classTiledMapProviderBase- Parameters:
mapName- The map name.capability- Function type.- Returns:
- true means to support; otherwise, false.
-
initTilesets
protected abstract java.util.List<ImageTileset> initTilesets()
Initializes the slice set.- Returns:
- returns a collection of supported slices.
-
-