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.
TiledMapProviderBase.TileDataConverter, TiledMapProviderBase.TileImageDrawer, TiledMapProviderBase.TileImageParameter
localTileResource
CACHE_DIR, LINK_MARK, lock, logger, message, QUESTION_MARK, REGEX, REPLACEMENT, tilePixHeight, tilePixWidth
Constructor and Description |
---|
SMTilesMapProvider()
Default constructor
|
SMTilesMapProvider(SMTilesMapProviderSetting setting)
Constructors with parameters
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
cacheEnabled() |
void |
dispose()
Release the resource object.
|
protected Point2D |
getOrigin(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 map
|
double[] |
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 boolean |
isResolutionEquals(double resolution1, double resolution2)
Determines if two resolutions are within the tolerance (1.0E-6)
|
boolean |
support(java.lang.String mapName, MapCapability capability)
Determines whether the map supports the specified function.
|
generateBigImage
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
public SMTilesMapProvider(SMTilesMapProviderSetting setting)
Constructors with parameters
setting
- Map service provider configurationpublic SMTilesMapProvider()
Default constructor
protected java.util.List<java.lang.String> initSupportedMapNames()
initSupportedMapNames
in class TiledMapProviderBase
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.
initDefaultMapParameter
in class TiledMapProviderBase
protected byte[] getTileImage(TiledMapProviderBase.TileImageParameter tileImageParameter)
Gets the BufferedImage of the requested slice.
getTileImage
in class LocalTileProviderBase
tileImageParameter
- slice parametersprotected Point2D getOrigin(java.lang.String mapName)
Gets the geographic coordinates of the upper left corner of the map.
getOrigin
in class TiledMapProviderBase
mapName
- Map namepublic double[] getSupportResolutions(java.lang.String mapName)
Returns the resolution of the current service support. If all resolutions are supported, an empty space is returned.
getSupportResolutions
in class TiledMapProviderBase
mapName
- Map name.public double[] getSupportScales(java.lang.String mapName)
According to the map name to get the scale set what the maps support.
mapName
- Map name.public OutputFormat[] getSupportImageFormat(java.lang.String mapName)
Returns an array of image formats supported by the specified map
getSupportImageFormat
in class TiledMapProviderBase
mapName
-public void dispose()
TiledMapProviderBase
Release the resource object.
dispose
in interface Disposable
dispose
in class TiledMapProviderBase
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
- doubleprotected boolean cacheEnabled()
cacheEnabled
in class TiledMapProviderBase
public boolean support(java.lang.String mapName, MapCapability capability)
MapProvider
support
in interface MapProvider
support
in class TiledMapProviderBase
mapName
- The map name.capability
- Function type.