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.
RemoteTileProviderBase.GetDefaultImageWhenException
TiledMapProviderBase.TileDataConverter, TiledMapProviderBase.TileImageDrawer, TiledMapProviderBase.TileImageParameter
SEND_REQUEST_COUNT
CACHE_DIR, LINK_MARK, lock, logger, message, QUESTION_MARK, REGEX, REPLACEMENT, tilePixHeight, tilePixWidth
Constructor and Description |
---|
ArcGISRestMapProvider()
Default constructor.
|
ArcGISRestMapProvider(ArcGISRestMapProviderSetting setting)
Constructors with parameters
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
cacheEnabled() |
protected void |
checkSetting(MapProviderSetting setting)
Checks the configuration of map service provider.
|
MapImage |
getMapImage(MapParameter mapParameter, ImageOutputOption outputOption)
Gets map images according to map parameters and image output settings.
|
protected Point2D |
getOrigin(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.TileDataConverter |
getTileDataConverter() |
protected byte[] |
getTileImage(TiledMapProviderBase.TileImageParameter parameter) |
protected java.lang.String |
getTileImageUrl(TiledMapProviderBase.TileImageParameter parameter) |
VectorStyle |
getVectorStyle(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 boolean |
isResolutionEquals(double resolution1, double resolution2)
Determines if two resolutions are within the tolerance (1.0E-6)
|
QueryResult |
queryByBounds(java.lang.String mapName, Rectangle2D bounds, QueryParameterSet queryParameterSet)
Queries the geometries in the specified range on the map.
|
QueryResult |
queryByGeometry(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.
|
QueryResult |
queryBySQL(java.lang.String mapName, QueryParameterSet queryParameterSet)
Performs SQL query on specified map.
|
boolean |
support(java.lang.String mapName, MapCapability capability)
Determines whether the map supports the specified function.
|
dispose, generateBigImage, getContent, getContent, getContent, getImageBySendURL, getImageBySendURL, init, sendRequestByHttpURLConnection, sendRequestByHttpURLConnection, viewEntire
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
public ArcGISRestMapProvider(ArcGISRestMapProviderSetting setting)
Constructors with parameters
setting
- Configure by ArcGIS Rest service providerpublic ArcGISRestMapProvider()
protected java.util.Map<java.lang.String,MapParameter> initDefaultMapParameter()
TiledMapProviderBase
Initializing the default map status, a mapping object will be returned, of which the key is map name, valude is map parameter object.
initDefaultMapParameter
in class TiledMapProviderBase
public double[] getSupportResolutions(java.lang.String mapName)
TiledMapProviderBase
Returns the resolution of the current service support. If all resolutions are supported, empty is returned.
getSupportResolutions
in class TiledMapProviderBase
mapName
- The map name.public MapImage getMapImage(MapParameter mapParameter, ImageOutputOption outputOption)
MapProvider
Gets map images according to map parameters and image output settings.
getMapImage
in interface MapProvider
getMapImage
in class TiledMapProviderBase
mapParameter
- Map parameters.outputOption
- Image output settings.protected java.lang.String getTileImageUrl(TiledMapProviderBase.TileImageParameter parameter)
getTileImageUrl
in class RemoteTileProviderBase
protected byte[] getTileImage(TiledMapProviderBase.TileImageParameter parameter)
getTileImage
in class RemoteTileProviderBase
public QueryResult queryByGeometry(java.lang.String mapName, Geometry geometry, SpatialQueryMode spatialQueryMode, QueryParameterSet queryParameterSet)
MapProvider
Queries geometric objects that satisfy a certain spatial relationship with a specified geometric object and meet query conditions on a specified map.
queryByGeometry
in interface MapProvider
queryByGeometry
in class TiledMapProviderBase
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 in queryParameterSet.queryParams[i]
.public QueryResult queryBySQL(java.lang.String mapName, QueryParameterSet queryParameterSet)
MapProvider
Performs SQL query on specified map.
queryBySQL
in interface MapProvider
queryBySQL
in class TiledMapProviderBase
mapName
- The map name.queryParameterSet
- Query parameters can query multiple layers of a map. The query parameters in a single layer can be set in queryParameterSet.queryParams[i]
.public QueryResult queryByBounds(java.lang.String mapName, Rectangle2D bounds, QueryParameterSet queryParameterSet)
MapProvider
Queries the geometries in the specified range on the map.
queryByBounds
in interface MapProvider
queryByBounds
in class TiledMapProviderBase
mapName
- The map name.bounds
- The specified query bounds.protected void checkSetting(MapProviderSetting setting)
TiledMapProviderBase
checkSetting
in class TiledMapProviderBase
protected Point2D getOrigin(java.lang.String mapName)
TiledMapProviderBase
Get the geographical coordinate of left upper corner of the map.
getOrigin
in class TiledMapProviderBase
mapName
- The map name.protected java.util.List<java.lang.String> initSupportedMapNames()
TiledMapProviderBase
initSupportedMapNames
in class TiledMapProviderBase
public OutputFormat[] getSupportImageFormat(java.lang.String mapName)
TiledMapProviderBase
Return the supported image formats.
getSupportImageFormat
in class TiledMapProviderBase
mapName
- The map name.protected boolean cacheEnabled()
cacheEnabled
in class TiledMapProviderBase
public boolean support(java.lang.String mapName, MapCapability capability)
MapProvider
support
in interface MapProvider
support
in class TiledMapProviderBase
mapName
- The map name.capability
- Function type.protected TiledMapProviderBase.TileDataConverter getTileDataConverter()
getTileDataConverter
in class TiledMapProviderBase
protected boolean isResolutionEquals(double resolution1, double resolution2)
TiledMapProviderBase
Determines if two resolutions are within the tolerance (1.0E-6)
isResolutionEquals
in class TiledMapProviderBase
resolution1
- doubleresolution2
- doublepublic VectorStyle getVectorStyle(java.lang.String mapName, java.lang.String[] layerNames, VectorStyleType type)
MapProvider
getVectorStyle
in interface MapProvider
getVectorStyle
in class TiledMapProviderBase
mapName
- The map name.layerNames
- The layer name.type
- The vector style type.