Class SMTilesMapProvider
- java.lang.Object
-
- com.supermap.services.components.spi.TiledMapProviderBase
-
- com.supermap.services.providers.LocalTileProviderBase
-
- com.supermap.services.providers.SMTilesMapProvider
-
- All Implemented Interfaces:
- Disposable, MapProvider, ProviderContextAware
public class SMTilesMapProvider extends LocalTileProviderBase
SMTiles map service provider. (SMTiles is a cached file format based on the MBTiles specification extension.)
SMTilesMapProvider provides the ability to obtain a map service from a local SMTiles file or standard MBTiles file and encapsulates the GIS function associated with the SuperMap iServer map.
MBTiles is a specification that stores tile map data into the SQLite database and can be quickly used, managed, and shared. The specification is developed by MapBox.
- See Also:
- MapBox MBTiles Introduction
-
-
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 SMTilesMapProvider()Default constructorSMTilesMapProvider(SMTilesMapProviderSetting setting)Constructors with parameters
-
Method Summary
Methods Modifier and Type Method and Description protected booleancacheEnabled()voiddispose()Release the resource object.protected Point2DgetOrigin(java.lang.String mapName)Gets the geographic coordinates of the upper left corner of the map.OutputFormat[]getSupportImageFormat(java.lang.String mapName)Returns an array of image formats supported by the specified mapdouble[]getSupportResolutions(java.lang.String mapName)Returns the resolution of the current service support.double[]getSupportScales(java.lang.String mapName)According to the map name to get the scale set what the maps support.protected byte[]getTileImage(TiledMapProviderBase.TileImageParameter tileImageParameter)Gets the BufferedImage of the requested slice.protected java.util.Map<java.lang.String,MapParameter>initDefaultMapParameter()Initializes the default map state, the return value is a map, the key is the map name, and the value is the map parameter object.protected java.util.List<java.lang.String>initSupportedMapNames()Initialize the list of supported maps.protected booleanisResolutionEquals(double resolution1, double resolution2)Determines if two resolutions are within the tolerance (1.0E-6)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, fillWatermark, findNearest, getDefaultMapParameter, getDefaultMapParameters, getMapImage, getMapParameter, getMapProviderSetting, getNames, getOverview, getProximalResolution, getProximalResolution, getResolutoinByScale, getResource, getResource, getTileDataConverter, getVectorStyle, init, measureArea, measureDistance, outputImage, outputImage, outputImageToFile, outputImageToFile, queryByBounds, queryByDistance, queryByGeometry, queryBySQL, rectifyMapParameter, setDefaultMapParameter, setDefaultMapParameters, setMapProviderSetting, setProviderContext, updateMap, viewEntire
-
-
-
-
Constructor Detail
-
SMTilesMapProvider
public SMTilesMapProvider(SMTilesMapProviderSetting setting)
Constructors with parameters
- Parameters:
setting- Map service provider configuration
-
SMTilesMapProvider
public SMTilesMapProvider()
Default constructor
-
-
Method Detail
-
initSupportedMapNames
protected java.util.List<java.lang.String> initSupportedMapNames()
Initialize the list of supported maps.- Specified by:
initSupportedMapNamesin classTiledMapProviderBase- Returns:
- the list of map names
-
initDefaultMapParameter
protected java.util.Map<java.lang.String,MapParameter> initDefaultMapParameter()
Initializes the default map state, the return value is a map, the key is the map name, and the value is the map parameter object.
- Specified by:
initDefaultMapParameterin classTiledMapProviderBase- Returns:
- map state mapping, the key is the map name, and the value is the map parameter object.
-
getTileImage
protected byte[] getTileImage(TiledMapProviderBase.TileImageParameter tileImageParameter)
Gets the BufferedImage of the requested slice.
- Specified by:
getTileImagein classLocalTileProviderBase- Parameters:
tileImageParameter- slice parameters- Returns:
- The BufferedImage of slice that is requested.
-
getOrigin
protected Point2D getOrigin(java.lang.String mapName)
Gets the geographic coordinates of the upper left corner of the map.
- Specified by:
getOriginin classTiledMapProviderBase- Parameters:
mapName- Map name- Returns:
- The geographic coordinates of the upper left corner of the map.
-
getSupportResolutions
public double[] getSupportResolutions(java.lang.String mapName)
Returns the resolution of the current service support. If all resolutions are supported, an empty space is returned.
- Specified by:
getSupportResolutionsin classTiledMapProviderBase- Parameters:
mapName- Map name.- Returns:
- resolution array
-
getSupportScales
public double[] getSupportScales(java.lang.String mapName)
According to the map name to get the scale set what the maps support.
- Parameters:
mapName- Map name.- Returns:
-
getSupportImageFormat
public OutputFormat[] getSupportImageFormat(java.lang.String mapName)
Returns an array of image formats supported by the specified map
- Specified by:
getSupportImageFormatin classTiledMapProviderBase- Parameters:
mapName-- Returns:
- Since:
- 7.0
-
dispose
public void dispose()
Description copied from class:TiledMapProviderBaseRelease the resource object.
- Specified by:
disposein interfaceDisposable- Overrides:
disposein classTiledMapProviderBase
-
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
-
cacheEnabled
protected boolean cacheEnabled()
- Specified by:
cacheEnabledin classTiledMapProviderBase
-
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.
-
-