com.supermap.services.providers
Class BingMapsMapProvider
- java.lang.Object
-
- com.supermap.services.components.spi.TiledMapProviderBase
-
- com.supermap.services.providers.RemoteTileProviderBase
-
- com.supermap.services.providers.BingMapsMapProvider
-
- All Implemented Interfaces:
- Disposable, MapProvider, ProviderContextAware
public class BingMapsMapProvider extends RemoteTileProviderBase
BingMaps the map service provider.
BingMapsMapProvider provides the ability to get map services from Bing Maps 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 BingMapsMapProvider()Default constructorBingMapsMapProvider(BingMapsMapProviderSetting setting)Constructors with parameters
-
Method Summary
Methods Modifier and Type Method and Description protected booleancacheEnabled()protected java.lang.StringgetBingMapsTileTemplate()Gets the url template for the bing maps tileprotected intgetLevel(double resolution)According to the resolution to obtain the corresponding levelprotected java.lang.StringgetMapName()Gets the map name.protected Point2DgetOrigin(java.lang.String mapName)Get the geographical coordinate of left upper corner of the map.protected java.lang.StringgetRemoteTileImageUrl(int colIndex, int rowIndex, double currentResolution)Gets the address of the remote server.protected java.lang.StringgetSubDomain()Randomly return a field.protected java.util.List<java.lang.String>getSubDomains()Gets a list of map server domain names.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)Get a collection of supported scalesprotected java.lang.StringgetTileImageUrl(java.lang.String mapName, int colIndex, int rowIndex, double currentResolution)Calculates the tile's url.protected java.lang.StringgetTileImageUrl(TiledMapProviderBase.TileImageParameter tileParam)protected java.util.Map<java.lang.String,MapParameter>initDefaultMapParameter()Initialize the default map state.protected booleaninitLODInfos()Initializes tile information.protected java.util.List<java.lang.String>initSupportedMapNames()Initializes the supported map list.protected booleanisResolutionEquals(double resolution1, double resolution2)Determines if two resolutions are within the tolerance (1.0E-6)protected booleanloadMetaData()Load the REST service metadata information.protected voidsetSubdomains(java.util.List<java.lang.String> subdomains)Sets a list of map server domain names.-
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
-
BingMapsMapProvider
public BingMapsMapProvider(BingMapsMapProviderSetting setting)
Constructors with parameters
- Parameters:
setting- Map service provider configuration
-
BingMapsMapProvider
public BingMapsMapProvider()
Default constructor
-
-
Method Detail
-
getSupportScales
public double[] getSupportScales(java.lang.String mapName)
Get a collection of supported scales- Parameters:
mapName-- Returns:
-
getSupportResolutions
public double[] getSupportResolutions(java.lang.String mapName)
Description copied from class:TiledMapProviderBaseReturns the resolution of the current service support. If all resolutions are supported, empty is returned.
- Specified by:
getSupportResolutionsin classTiledMapProviderBase- Parameters:
mapName- The map name.- Returns:
- The resolution array.
-
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
-
initSupportedMapNames
protected java.util.List<java.lang.String> initSupportedMapNames()
Description copied from class:TiledMapProviderBaseInitializes the supported map list.- Specified by:
initSupportedMapNamesin classTiledMapProviderBase- Returns:
- The map name list.
-
initDefaultMapParameter
protected java.util.Map<java.lang.String,MapParameter> initDefaultMapParameter()
Initialize the default map state.- Specified by:
initDefaultMapParameterin classTiledMapProviderBase- Returns:
- Map status mapping. The key is the map name, and the value is the map parameter object.
-
getTileImageUrl
protected java.lang.String getTileImageUrl(TiledMapProviderBase.TileImageParameter tileParam)
- Specified by:
getTileImageUrlin classRemoteTileProviderBase
-
getOrigin
protected Point2D getOrigin(java.lang.String mapName)
Description copied from class:TiledMapProviderBaseGet the geographical coordinate of left upper corner of the map.
- Specified by:
getOriginin classTiledMapProviderBase- Parameters:
mapName- The map name.- Returns:
- The geographical coordinate of left upper corner of the map.
-
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
-
loadMetaData
protected boolean loadMetaData()
Load the REST service metadata information.
- Returns:
- Returns true if the load was successful, false otherwise.
-
initLODInfos
protected boolean initLODInfos()
Initializes tile information.
-
getTileImageUrl
protected java.lang.String getTileImageUrl(java.lang.String mapName, int colIndex, int rowIndex, double currentResolution)Calculates the tile's url.- Parameters:
colIndex-rule-currentResolution-- Returns:
-
getRemoteTileImageUrl
protected java.lang.String getRemoteTileImageUrl(int colIndex, int rowIndex, double currentResolution)Gets the address of the remote server.- Parameters:
colIndex-rule-currentResolution-- Returns:
-
getSubDomain
protected java.lang.String getSubDomain()
Randomly return a field.- Returns:
-
getLevel
protected int getLevel(double resolution)
According to the resolution to obtain the corresponding level- Parameters:
resolution-- Returns:
-
getMapName
protected java.lang.String getMapName()
Gets the map name.- Returns:
-
getSubDomains
protected java.util.List<java.lang.String> getSubDomains()
Gets a list of map server domain names.- Returns:
-
setSubdomains
protected void setSubdomains(java.util.List<java.lang.String> subdomains)
Sets a list of map server domain names.- Parameters:
subdomains-
-
getBingMapsTileTemplate
protected java.lang.String getBingMapsTileTemplate()
Gets the url template for the bing maps tile- Returns:
-
cacheEnabled
protected boolean cacheEnabled()
- Specified by:
cacheEnabledin classTiledMapProviderBase
-
-