com.supermap.services.providers
Class TiandituMapProvider
- java.lang.Object
-
- com.supermap.services.components.spi.TiledMapProviderBase
-
- com.supermap.services.providers.RemoteTileProviderBase
-
- com.supermap.services.providers.TiandituMapProvider
-
- All Implemented Interfaces:
- Disposable, MapProvider, ProviderContextAware
public class TiandituMapProvider extends RemoteTileProviderBase
Tianditu map service provider.
TiandituMapProvider provides the ability to acquire map services from the Sky Map online service and encapsulates GIS functionality related to SuperMap iServer map.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.supermap.services.providers.RemoteTileProviderBase
RemoteTileProviderBase.GetDefaultImageWhenException
-
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.RemoteTileProviderBase
SEND_REQUEST_COUNT
-
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 TiandituMapProvider()Default constructorTiandituMapProvider(TiandituMapProviderSetting setting)Constructors with parameters
-
Method Summary
Methods Modifier and Type Method and Description protected booleancacheEnabled()protected intgetLevel(double resolution, boolean isMercator)protected Point2DgetOrigin(java.lang.String mapName)Get the starting point of the map (top left).OutputFormat[]getSupportImageFormat(java.lang.String mapName)Gets an array of supported image formats.double[]getSupportResolutions(java.lang.String mapName)Gets the resolution supported by mapdouble[]getSupportScales(java.lang.String mapName)Get scale supported by map.protected byte[]getTileImage(TiledMapProviderBase.TileImageParameter tileParam)protected java.lang.StringgetTileImageUrl(java.lang.String mapName, int colIndex, int rowIndex, double resolution)protected java.lang.StringgetTileImageUrl(TiledMapProviderBase.TileImageParameter tileParam)protected java.util.Map<java.lang.String,MapParameter>initDefaultMapParameter()Gets the default map parameters.protected booleaninitLODInfos()Initializes tile information.protected java.util.List<java.lang.String>initSupportedMapNames()Initializes the supported map names.protected booleanisResolutionEquals(double resolution1, double resolution2, boolean isMercator)-
Methods inherited from class com.supermap.services.providers.RemoteTileProviderBase
dispose, generateBigImage, getContent, getContent, getContent, getImageBySendURL, getImageBySendURL, init, sendRequestByHttpURLConnection, sendRequestByHttpURLConnection, viewEntire
-
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, isResolutionEquals, measureArea, measureDistance, outputImage, outputImage, outputImageToFile, outputImageToFile, queryByBounds, queryByDistance, queryByGeometry, queryBySQL, rectifyMapParameter, setDefaultMapParameter, setDefaultMapParameters, setMapProviderSetting, setProviderContext, support, updateMap
-
-
-
-
Constructor Detail
-
TiandituMapProvider
public TiandituMapProvider(TiandituMapProviderSetting setting)
Constructors with parameters
- Parameters:
setting- Map service provider configuration
-
TiandituMapProvider
public TiandituMapProvider()
Default constructor
-
-
Method Detail
-
initSupportedMapNames
protected java.util.List<java.lang.String> initSupportedMapNames()
Initializes the supported map names.
- Specified by:
initSupportedMapNamesin classTiledMapProviderBase- Returns:
- list of map names.
-
initDefaultMapParameter
protected java.util.Map<java.lang.String,MapParameter> initDefaultMapParameter()
Gets the default map parameters.
- Specified by:
initDefaultMapParameterin classTiledMapProviderBase- Returns:
- map parameter list. key is the map name, and value is the default parameter for the map.
-
getOrigin
protected Point2D getOrigin(java.lang.String mapName)
Get the starting point of the map (top left).
- Specified by:
getOriginin classTiledMapProviderBase- Parameters:
mapName- map name.- Returns:
- starting point object.
-
getSupportResolutions
public double[] getSupportResolutions(java.lang.String mapName)
Gets the resolution supported by map
- Specified by:
getSupportResolutionsin classTiledMapProviderBase- Parameters:
mapName- map name.- Returns:
- resolution set.
-
getSupportScales
public double[] getSupportScales(java.lang.String mapName)
Get scale supported by map.- Parameters:
mapName- map name.- Returns:
- The scale set.
-
isResolutionEquals
protected boolean isResolutionEquals(double resolution1, double resolution2, boolean isMercator)- Parameters:
resolution1double- valueresolution2double- value- Returns:
- is equal
-
getTileImageUrl
protected java.lang.String getTileImageUrl(java.lang.String mapName, int colIndex, int rowIndex, double resolution)
-
getLevel
protected int getLevel(double resolution, boolean isMercator)
-
initLODInfos
protected boolean initLODInfos()
Initializes tile information.
- Returns:
- Whether the initialization was successful
-
getSupportImageFormat
public OutputFormat[] getSupportImageFormat(java.lang.String mapName)
Gets an array of supported image formats.
- Specified by:
getSupportImageFormatin classTiledMapProviderBase- Parameters:
mapName- Map name- Returns:
- An array of supported image formats
-
getTileImageUrl
protected java.lang.String getTileImageUrl(TiledMapProviderBase.TileImageParameter tileParam)
- Specified by:
getTileImageUrlin classRemoteTileProviderBase
-
getTileImage
protected byte[] getTileImage(TiledMapProviderBase.TileImageParameter tileParam)
- Overrides:
getTileImagein classRemoteTileProviderBase
-
cacheEnabled
protected boolean cacheEnabled()
- Specified by:
cacheEnabledin classTiledMapProviderBase
-
-