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.
TiledMapProviderBase.TileDataConverter, TiledMapProviderBase.TileImageDrawer, TiledMapProviderBase.TileImageParameter
localTileResource
CACHE_DIR, LINK_MARK, lock, logger, message, QUESTION_MARK, REGEX, REPLACEMENT, tilePixHeight, tilePixWidth
Constructor and Description |
---|
TilesetMapProvider() |
TilesetMapProvider(MapProviderSetting setting) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
cacheEnabled() |
protected Point2D |
getOrigin(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 map
|
protected void |
init(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 boolean |
isResolutionEquals(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 void |
setMapInfoByTilesets(java.util.List<ImageTileset> tilesets) |
boolean |
support(java.lang.String mapName, MapCapability capability)
Determines whether the map supports the specified function.
|
generateBigImage
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
public TilesetMapProvider()
public TilesetMapProvider(MapProviderSetting setting)
public double[] getSupportResolutions(java.lang.String mapName)
TiledMapProviderBase
Returns the resolution of the current service support. If all resolutions are supported, empty is returned.
getSupportResolutions
in class TiledMapProviderBase
mapName
- The map name.public TilesetInfo[] getTilesetInfos(java.lang.String mapName)
TilesetInfoAttainable
Returns all the tile set information associated with the specified map
getTilesetInfos
in interface TilesetInfoAttainable
public OutputFormat[] getSupportImageFormat(java.lang.String mapName)
TiledMapProviderBase
Return the supported image formats.
getSupportImageFormat
in class TiledMapProviderBase
mapName
- The map name.protected java.util.List<java.lang.String> initSupportedMapNames()
TiledMapProviderBase
initSupportedMapNames
in class TiledMapProviderBase
protected java.util.Map<java.lang.String,MapParameter> initDefaultMapParameter()
TiledMapProviderBase
Initializing the default map status, a mapping object will be returned, of which the key is map name, valude is map parameter object.
initDefaultMapParameter
in class TiledMapProviderBase
protected byte[] outputImage(MapParameter param, ImageOutputOption outputOption, double currentResolution)
TiledMapProviderBase
Output image in real time. It is stored in the specified path according to the map parameter.
outputImage
in class TiledMapProviderBase
param
- Map statusoutputOption
- Image parametercurrentResolution
- Resolutionprotected byte[] getTileImage(TiledMapProviderBase.TileImageParameter tileParam)
getTileImage
in class LocalTileProviderBase
protected Point2D getOrigin(java.lang.String mapName)
TiledMapProviderBase
Get the geographical coordinate of left upper corner of the map.
getOrigin
in class TiledMapProviderBase
mapName
- The map name.protected boolean cacheEnabled()
cacheEnabled
in class TiledMapProviderBase
protected void init(MapProviderSetting setting)
TiledMapProviderBase
Initialization function. This function does not carry on null judgment on parameter, but it may judge the correction of the contents.
init
in class TiledMapProviderBase
setting
- The configuration object of service provider.protected void setMapInfoByTilesets(java.util.List<ImageTileset> tilesets)
protected boolean isResolutionEquals(double resolution1, double resolution2)
TiledMapProviderBase
Determines if two resolutions are within the tolerance (1.0E-6)
isResolutionEquals
in class TiledMapProviderBase
resolution1
- doubleresolution2
- doublepublic boolean support(java.lang.String mapName, MapCapability capability)
MapProvider
support
in interface MapProvider
support
in class TiledMapProviderBase
mapName
- The map name.capability
- Function type.protected abstract java.util.List<ImageTileset> initTilesets()