Class ArcGISRestMapProvider
- java.lang.Object
-
- com.supermap.services.components.spi.TiledMapProviderBase
-
- com.supermap.services.providers.RemoteTileProviderBase
-
- com.supermap.services.providers.ArcGISRestMapProvider
-
- All Implemented Interfaces:
- Disposable, MapProvider, ProviderContextAware
public class ArcGISRestMapProvider extends RemoteTileProviderBase
ArcGIS Rest map service provider.
ArcGISRestMapProvider supports drawing operations and map queries. The map query function provided by the Query resource of ArcGIS REST map service, and support sql query, spatial query, scope query; Do not support distance inquiries, recent feature query; Unsupported query parameters are: query start record location, expect to return the number of records, only return to the ground information.
- Notes:
- Docking Query Parameters: geometry, geometryType, where, objectIds, outFields, returnGeomery, orderByFields (ArcGIS 10.1 or higher version). outStatistics (ArcGIS 10.1 or higher).
- Supported spatial query relations: INTERSECT, CONTAIN, CROSS, TOUCH, WITHIN and OVERLAP.
-
-
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 ArcGISRestMapProvider()Default constructor.ArcGISRestMapProvider(ArcGISRestMapProviderSetting setting)Constructors with parameters
-
Method Summary
Methods Modifier and Type Method and Description protected booleancacheEnabled()protected voidcheckSetting(MapProviderSetting setting)Checks the configuration of map service provider.MapImagegetMapImage(MapParameter mapParameter, ImageOutputOption outputOption)Gets map images according to map parameters and image output settings.protected Point2DgetOrigin(java.lang.String mapName)Get the geographical coordinate of left upper corner of the map.OutputFormat[]getSupportImageFormat(java.lang.String mapName)Return the supported image formats.double[]getSupportResolutions(java.lang.String mapName)Returns the resolution of the current service support.
protected TiledMapProviderBase.TileDataConvertergetTileDataConverter()protected byte[]getTileImage(TiledMapProviderBase.TileImageParameter parameter)protected java.lang.StringgetTileImageUrl(TiledMapProviderBase.TileImageParameter parameter)VectorStylegetVectorStyle(java.lang.String mapName, java.lang.String[] layerNames, VectorStyleType type)Gets the specified vector layer style in the specified map.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)QueryResultqueryByBounds(java.lang.String mapName, Rectangle2D bounds, QueryParameterSet queryParameterSet)Queries the geometries in the specified range on the map.QueryResultqueryByGeometry(java.lang.String mapName, Geometry geometry, SpatialQueryMode spatialQueryMode, QueryParameterSet queryParameterSet)Queries geometric objects that satisfy a certain spatial relationship with a specified geometric object and meet query conditions on a specified map.QueryResultqueryBySQL(java.lang.String mapName, QueryParameterSet queryParameterSet)Performs SQL query on specified map.booleansupport(java.lang.String mapName, MapCapability capability)Determines whether the map supports the specified function.-
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
clearCache, fillWatermark, findNearest, getDefaultMapParameter, getDefaultMapParameters, getMapParameter, getMapProviderSetting, getNames, getOverview, getProximalResolution, getProximalResolution, getResolutoinByScale, getResource, getResource, measureArea, measureDistance, outputImage, outputImage, outputImageToFile, outputImageToFile, queryByDistance, rectifyMapParameter, setDefaultMapParameter, setDefaultMapParameters, setMapProviderSetting, setProviderContext, updateMap
-
-
-
-
Constructor Detail
-
ArcGISRestMapProvider
public ArcGISRestMapProvider(ArcGISRestMapProviderSetting setting)
Constructors with parameters
- Parameters:
setting- Configure by ArcGIS Rest service provider
-
ArcGISRestMapProvider
public ArcGISRestMapProvider()
Default constructor.
-
-
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.
-
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.
-
getMapImage
public MapImage getMapImage(MapParameter mapParameter, ImageOutputOption outputOption)
Description copied from interface:MapProviderGets map images according to map parameters and image output settings.
- Specified by:
getMapImagein interfaceMapProvider- Overrides:
getMapImagein classTiledMapProviderBase- Parameters:
mapParameter- Map parameters.outputOption- Image output settings.- Returns:
- The map image object.
-
getTileImageUrl
protected java.lang.String getTileImageUrl(TiledMapProviderBase.TileImageParameter parameter)
- Specified by:
getTileImageUrlin classRemoteTileProviderBase
-
getTileImage
protected byte[] getTileImage(TiledMapProviderBase.TileImageParameter parameter)
- Overrides:
getTileImagein classRemoteTileProviderBase
-
queryByGeometry
public QueryResult queryByGeometry(java.lang.String mapName, Geometry geometry, SpatialQueryMode spatialQueryMode, QueryParameterSet queryParameterSet)
Description copied from interface:MapProviderQueries geometric objects that satisfy a certain spatial relationship with a specified geometric object and meet query conditions on a specified map.
- Specified by:
queryByGeometryin interfaceMapProvider- Overrides:
queryByGeometryin classTiledMapProviderBase- Parameters:
mapName- The map name.geometry- The geometric object, which has spatial information and shape information, but no attribute information.spatialQueryMode- The spatial query mode, which defines several spatial relationships between geometries, and it allows users to construct filter conditions to perform querying. For example, searching spatial objects which are contained in specified region object, or which have a disjoint or adjacent relationship with the specified region object.queryParameterSet- Query parameters can query multiple layers of a map. The query parameters in a single layer can be set inqueryParameterSet.queryParams[i].- Returns:
- Query result object.
-
queryBySQL
public QueryResult queryBySQL(java.lang.String mapName, QueryParameterSet queryParameterSet)
Description copied from interface:MapProviderPerforms SQL query on specified map.
- Specified by:
queryBySQLin interfaceMapProvider- Overrides:
queryBySQLin classTiledMapProviderBase- Parameters:
mapName- The map name.queryParameterSet- Query parameters can query multiple layers of a map. The query parameters in a single layer can be set inqueryParameterSet.queryParams[i].- Returns:
- Query result object.
-
queryByBounds
public QueryResult queryByBounds(java.lang.String mapName, Rectangle2D bounds, QueryParameterSet queryParameterSet)
Description copied from interface:MapProviderQueries the geometries in the specified range on the map.
- Specified by:
queryByBoundsin interfaceMapProvider- Overrides:
queryByBoundsin classTiledMapProviderBase- Parameters:
mapName- The map name.bounds- The specified query bounds.- Returns:
- Query result object.
-
checkSetting
protected void checkSetting(MapProviderSetting setting)
Description copied from class:TiledMapProviderBaseChecks the configuration of map service provider.- Overrides:
checkSettingin classTiledMapProviderBase
-
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.
-
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.
-
getSupportImageFormat
public OutputFormat[] getSupportImageFormat(java.lang.String mapName)
Description copied from class:TiledMapProviderBaseReturn the supported image formats.
- Specified by:
getSupportImageFormatin classTiledMapProviderBase- Parameters:
mapName- The map name.- Returns:
- Supported image format array
-
cacheEnabled
protected boolean cacheEnabled()
- Specified by:
cacheEnabledin classTiledMapProviderBase
-
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.
-
getTileDataConverter
protected TiledMapProviderBase.TileDataConverter getTileDataConverter()
- Overrides:
getTileDataConverterin 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- doubleresolution2- double- Returns:
- Is it equal
-
getVectorStyle
public VectorStyle getVectorStyle(java.lang.String mapName, java.lang.String[] layerNames, VectorStyleType type)
Description copied from interface:MapProviderGets the specified vector layer style in the specified map.- Specified by:
getVectorStylein interfaceMapProvider- Overrides:
getVectorStylein classTiledMapProviderBase- Parameters:
mapName- The map name.layerNames- The layer name.type- The vector style type.- Returns:
- Vector layer style.
-
-