com.supermap.services.providers
Class BaiduMapProvider
- java.lang.Object
-
- com.supermap.services.components.spi.TiledMapProviderBase
-
- com.supermap.services.providers.RemoteTileProviderBase
-
- com.supermap.services.providers.BaiduMapProvider
-
- All Implemented Interfaces:
- Disposable, KeywordsQueryable, MapProvider, ProviderContextAware
public class BaiduMapProvider extends RemoteTileProviderBase implements KeywordsQueryable, Disposable
Service provider for Baidu Map.
The BaiduMapMapProvider provides the capabilites of obtaining a map service from the Baidu Maps online service and encapsulates SuperMap iServer map related GIS functions.
-
-
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 BaiduMapProvider()BaiduMapProvider(BaiduMapProviderSetting setting)
-
Method Summary
Methods Modifier and Type Method and Description protected booleancacheEnabled()voiddispose()Release the resource object.protected Point2DgetOrigin(java.lang.String arg0)Get the geographical coordinate of left upper corner of the map.OutputFormat[]getSupportImageFormat(java.lang.String arg0)Return the supported image formats.double[]getSupportResolutions(java.lang.String arg0)Returns the resolution of the current service support.
protected TiledMapProviderBase.TileDataConvertergetTileDataConverter()protected byte[]getTileImage(TiledMapProviderBase.TileImageParameter tileParam)protected java.lang.StringgetTileImageUrl(TiledMapProviderBase.TileImageParameter tileParam)protected java.util.Map<java.lang.String,MapParameter>initDefaultMapParameter()Initializing the default map status, a mapping object will be returned, of which the key is map name, valude is map parameter object.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)QueryResultqueryByKeywords(java.lang.String mapName, KeywordsQueryParameterSet queryParameterSet)Querys the features on the map based on the keywords.booleansupport(java.lang.String mapName, MapCapability capability)Determines whether the map supports the specified function.-
Methods inherited from class com.supermap.services.providers.RemoteTileProviderBase
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, getVectorStyle, measureArea, measureDistance, outputImage, outputImage, outputImageToFile, outputImageToFile, queryByBounds, queryByDistance, queryByGeometry, queryBySQL, rectifyMapParameter, setDefaultMapParameter, setDefaultMapParameters, setMapProviderSetting, setProviderContext, updateMap
-
-
-
-
Constructor Detail
-
BaiduMapProvider
public BaiduMapProvider()
-
BaiduMapProvider
public BaiduMapProvider(BaiduMapProviderSetting setting)
-
-
Method Detail
-
initDefaultMapParameter
protected java.util.Map<java.lang.String,MapParameter> initDefaultMapParameter()
Description copied from class:TiledMapProviderBaseInitializing the default map status, a mapping object will be returned, of which the key is map name, valude is map parameter object.
- Specified by:
initDefaultMapParameterin classTiledMapProviderBase- Returns:
- Map status mapping. The key is the map name, and the value is the map parameter object.
-
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.
-
queryByKeywords
public QueryResult queryByKeywords(java.lang.String mapName, KeywordsQueryParameterSet queryParameterSet)
Description copied from interface:KeywordsQueryableQuerys the features on the map based on the keywords.- Specified by:
queryByKeywordsin interfaceKeywordsQueryable- Parameters:
mapName- Map name.- Returns:
-
dispose
public void dispose()
Description copied from class:TiledMapProviderBaseRelease the resource object.
- Specified by:
disposein interfaceDisposable- Overrides:
disposein classRemoteTileProviderBase
-
getTileImage
protected byte[] getTileImage(TiledMapProviderBase.TileImageParameter tileParam)
- Overrides:
getTileImagein classRemoteTileProviderBase
-
getTileDataConverter
protected TiledMapProviderBase.TileDataConverter getTileDataConverter()
- Overrides:
getTileDataConverterin classTiledMapProviderBase
-
getTileImageUrl
protected java.lang.String getTileImageUrl(TiledMapProviderBase.TileImageParameter tileParam)
- Specified by:
getTileImageUrlin classRemoteTileProviderBase
-
cacheEnabled
protected boolean cacheEnabled()
- Specified by:
cacheEnabledin 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- Resolution 1resolution2- Resolution 2- Returns:
- Is it equal
-
getOrigin
protected Point2D getOrigin(java.lang.String arg0)
Description copied from class:TiledMapProviderBaseGet the geographical coordinate of left upper corner of the map.
- Specified by:
getOriginin classTiledMapProviderBase- Parameters:
arg0- The map name.- Returns:
- The geographical coordinate of left upper corner of the map.
-
getSupportImageFormat
public OutputFormat[] getSupportImageFormat(java.lang.String arg0)
Description copied from class:TiledMapProviderBaseReturn the supported image formats.
- Specified by:
getSupportImageFormatin classTiledMapProviderBase- Parameters:
arg0- The map name.- Returns:
- Supported image format array
-
getSupportResolutions
public double[] getSupportResolutions(java.lang.String arg0)
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:
arg0- The map name.- Returns:
- The resolution array.
-
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.
-
-