com.supermap.services.providers
Class GoogleMapsMapProvider
- java.lang.Object
-
- com.supermap.services.components.spi.TiledMapProviderBase
-
- com.supermap.services.providers.RemoteTileProviderBase
-
- com.supermap.services.providers.GoogleMapsMapProvider
-
- All Implemented Interfaces:
- Disposable, MapProvider, ProviderContextAware
public class GoogleMapsMapProvider extends RemoteTileProviderBase
sample Google Map, the map service provider.
GoogleMapsMapProvider provides the ability to to aggregate third-party Google Maps services, encapsulates the GIS function associated with the 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 GoogleMapsMapProvider()GoogleMapsMapProvider(GoogleMapsMapProviderSetting setting)
-
Method Summary
Methods Modifier and Type Method and Description protected booleancacheEnabled()protected byte[]getImageBySendURL(java.lang.String tileImageUrl)Gets a picture based on urlprotected byte[]getImageBySendURL(java.lang.String tileImageUrl, RemoteTileProviderBase.GetDefaultImageWhenException exceptionOpertor)Gets a picture based on urlprotected byte[]getImageBySendURL(java.lang.String tileImageUrl, RemoteTileProviderBase.GetDefaultImageWhenException exceptionOpertor, TiledMapProviderBase.TileImageParameter tileParam)protected Point2DgetOrigin(java.lang.String arg0)Get the geographical coordinate of left upper corner of the map.OutputFormat[]getSupportImageFormat(java.lang.String arg0)Returns an array of image formats supported by the specified mapdouble[]getSupportResolutions(java.lang.String arg0)Returns the resolution of the current service support.
protected byte[]getTileImage(TiledMapProviderBase.TileImageParameter tileParam)protected java.lang.StringgetTileImageUrl(TiledMapProviderBase.TileImageParameter tileImagePrameter)Get the Google Maps tile URLprotected 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-
Methods inherited from class com.supermap.services.providers.RemoteTileProviderBase
dispose, generateBigImage, getContent, getContent, getContent, 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
-
GoogleMapsMapProvider
public GoogleMapsMapProvider()
-
GoogleMapsMapProvider
public GoogleMapsMapProvider(GoogleMapsMapProviderSetting setting)
-
-
Method Detail
-
getTileImageUrl
protected java.lang.String getTileImageUrl(TiledMapProviderBase.TileImageParameter tileImagePrameter)
Get the Google Maps tile URL
- Specified by:
getTileImageUrlin classRemoteTileProviderBase- Parameters:
tileParam- Picture parameters
-
cacheEnabled
protected boolean cacheEnabled()
- Specified by:
cacheEnabledin classTiledMapProviderBase
-
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)
Returns an array of image formats supported by the specified map
- Specified by:
getSupportImageFormatin classTiledMapProviderBase- Parameters:
mapName-- Returns:
- Since:
- 7.1.0
-
getImageBySendURL
protected byte[] getImageBySendURL(java.lang.String tileImageUrl)
Description copied from class:RemoteTileProviderBaseGets a picture based on url- Overrides:
getImageBySendURLin classRemoteTileProviderBase- Returns:
- the corresponding image for url
-
getTileImage
protected byte[] getTileImage(TiledMapProviderBase.TileImageParameter tileParam)
- Overrides:
getTileImagein classRemoteTileProviderBase
-
getImageBySendURL
protected byte[] getImageBySendURL(java.lang.String tileImageUrl, RemoteTileProviderBase.GetDefaultImageWhenException exceptionOpertor)Description copied from class:RemoteTileProviderBaseGets a picture based on url- Overrides:
getImageBySendURLin classRemoteTileProviderBaseexceptionOpertor- When there is an exception to the operation- Returns:
- the corresponding image for url
-
getImageBySendURL
protected byte[] getImageBySendURL(java.lang.String tileImageUrl, RemoteTileProviderBase.GetDefaultImageWhenException exceptionOpertor, TiledMapProviderBase.TileImageParameter tileParam)
-
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.
-
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.
-
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
-
-