Class CloudMapProvider
- java.lang.Object
-
- com.supermap.services.components.spi.TiledMapProviderBase
-
- com.supermap.services.providers.RemoteTileProviderBase
-
- com.supermap.services.providers.CloudMapProvider
-
- All Implemented Interfaces:
- Disposable, MapProvider, ProviderContextAware
public class CloudMapProvider extends RemoteTileProviderBase
SuperMap cloud the map service provider.
CloudMapProvider provides the ability to get map services from SuperMap cloud online services and encapsulates GIS functionality related to SuperMap iServer .
-
-
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 CloudMapProvider()Default constructorCloudMapProvider(CloudMapProviderSetting setting)Constructors with parameters
-
Method Summary
Methods Modifier and Type Method and Description protected booleancacheEnabled()protected intgetLevel(double resolution)According to the resolution to get the levelprotected Point2DgetOrigin(java.lang.String mapName)Gets the geographic coordinates of the upper left corner of the map.OutputFormat[]getSupportImageFormat(java.lang.String mapName)Gets an array of supported image formats.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 java.lang.StringgetTileImageUrl(java.lang.String mapName, int colIndex, int rowIndex, double resolution)Gets the requested block map URLprotected java.lang.StringgetTileImageUrl(TiledMapProviderBase.TileImageParameter tileParam)Rectangle2DgetViewBounds(java.lang.String mapName)Returns the visual range supported by the map.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 booleaninitLODInfos()Initializes tile information.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)-
Methods inherited from class com.supermap.services.providers.RemoteTileProviderBase
dispose, generateBigImage, getContent, getContent, getContent, getImageBySendURL, getImageBySendURL, getTileImage, 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, measureArea, measureDistance, outputImage, outputImage, outputImageToFile, outputImageToFile, queryByBounds, queryByDistance, queryByGeometry, queryBySQL, rectifyMapParameter, setDefaultMapParameter, setDefaultMapParameters, setMapProviderSetting, setProviderContext, support, updateMap
-
-
-
-
Constructor Detail
-
CloudMapProvider
public CloudMapProvider(CloudMapProviderSetting setting)
Constructors with parameters
- Parameters:
setting- Map service provider configuration
-
CloudMapProvider
public CloudMapProvider()
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.
-
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, empty 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:
- The scale set.
-
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- Resolution1resolution1- Resolution2resolution2- double- Returns:
- Whether it is equal
-
getTileImageUrl
protected java.lang.String getTileImageUrl(java.lang.String mapName, int colIndex, int rowIndex, double resolution)Gets the requested block map URL
- Parameters:
mapName- Map namecolIndex- Column indexrowIndex- Row indexresolution- Resolution Gets the requested block map URL
-
getLevel
protected int getLevel(double resolution)
According to the resolution to get the level
- Parameters:
resolution- Resolution- Returns:
- The scale level.
-
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
-
getViewBounds
public Rectangle2D getViewBounds(java.lang.String mapName)
Returns the visual range supported by the map.
- Parameters:
mapName- Map name- Returns:
- the visual range supported by the map.
-
getTileImageUrl
protected java.lang.String getTileImageUrl(TiledMapProviderBase.TileImageParameter tileParam)
- Specified by:
getTileImageUrlin classRemoteTileProviderBase
-
cacheEnabled
protected boolean cacheEnabled()
- Specified by:
cacheEnabledin classTiledMapProviderBase
-
-