Class ArcGISMapServiceInfo
- All Implemented Interfaces:
JsonSerializable
An ArcGIS map service is a data service that provides access to map images that can be rendered dynamically or
pre-rendered and cached in a tile grid as static images. You can display dynamically rendered images using
ArcGISMapImageLayer
and pre-rendered static images using
ArcGISTiledLayer
.
ArcGISMapServiceInfo
provides basic information about the map, including the layers that it contains,
whether or not the map is cached, its spatial reference, initial and full extents, map units, and copyright
text. It also provides some metadata associated with the service, such as the service description, its author,
and keywords. If the map service has a tile cache, additional information about the tiling scheme is included,
such as the levels of detail, tiling scheme origin, and tile dimensions.
You can obtain the ArcGISMapServiceInfo
from a loaded ArcGISMapImageLayer
, ArcGISTiledLayer
, or
ExportTileCacheTask
.
- Since:
- 100.0.0
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Whether exporting tiles in compact format (.tpk) is supported.static ArcGISMapServiceInfo
Creates an ArcGISMapServiceInfo instance from a JSON string.Returns the attribution of this ArcGIS Map Service.Gets the map service's capabilities.Returns the current version of the ArcGIS map service.Returns the description.Gets the document information such as the title, author, and comments.Returns the full extent of the layer.Returns the initial extent of the layer.Gets the available metadata for sublayers in the service as an unmodifiable list of MapServiceLayerIdInfo objects.Returns the name of the map.int
Gets the maximum number of tiles that can be exported.int
Returns the max image height in pixels.int
Returns the max image width in pixels.int
Gets the maximum number of records that will be returned at once for a query.double
Returns the layers's max scale.double
Returns the layers's min scale.Returns ArcGIS map service description.Returns the type of web service.Gets the spatial reference of the map service.Gets the image format types supported by this layer when generating a map image.Gets the available stand-alone tables in the service as an unmodifiable list of MapServiceLayerIdInfo objects.Returns the tile information of this ArcGIS map service.Gets a list of tile server URLs that can be used to split requests for tiles.Returns information on the support of time based queries and map requests of this map service.getUnit()
Gets the units used by this ArcGIS map service.Gets unknown data from the source JSON.Gets unsupported data from the source JSON.getUrl()
Gets the map service URL.boolean
True if the ArcGIS map service has a single fused map cache, false otherwise.boolean
Whether exporting tiles in compact version 2 format (.tpkx) is supported.boolean
True if the ArcGIS map service supports dynamic layers, false otherwise.toJson()
Serializes this object to a JSON string.
-
Method Details
-
fromJson
Creates an ArcGISMapServiceInfo instance from a JSON string.- Parameters:
json
- a JSON string that represents an ArcGISMapServiceInfo- Returns:
- an ArcGISMapServiceInfo instance
- Throws:
IllegalArgumentException
- if json is null or empty- Since:
- 100.0.0
-
toJson
Description copied from interface:JsonSerializable
Serializes this object to a JSON string. Note that unknown JSON is omitted from the serialized string.- Specified by:
toJson
in interfaceJsonSerializable
- Returns:
- a JSON string
-
getUnknownJson
Description copied from interface:JsonSerializable
Gets unknown data from the source JSON.Unknown JSON is a Map of values not defined in the ArcGIS specification used to create this object but found in the source JSON. If the object is written back to JSON, any unknown JSON data is not persisted. The ArcGIS specification may be for a web map, web scene, REST API, and so on.
- Specified by:
getUnknownJson
in interfaceJsonSerializable
- Returns:
- an unmodifiable Map containing unknown data from the source JSON
-
getUnsupportedJson
Description copied from interface:JsonSerializable
Gets unsupported data from the source JSON.Unsupported JSON is a Map of values defined in the ArcGIS specification used to create this object but not currently used in this API. If the object is written back to JSON, any unsupported JSON data is persisted. The ArcGIS specification may be from a web map, web scene, REST API, and so on.
- Specified by:
getUnsupportedJson
in interfaceJsonSerializable
- Returns:
- an unmodifiable Map containing unsupported data from the source JSON
-
getUrl
Gets the map service URL.- Returns:
- the map service URL.
- Since:
- 100.0.0
-
getAttribution
Returns the attribution of this ArcGIS Map Service.- Returns:
- the attribution of this ArcGIS Map Service
- Since:
- 100.0.0
-
getCapabilities
Gets the map service's capabilities. For example, exporting map images, data, and query operations.- Returns:
- the map service's capabilities
-
getCurrentVersion
Returns the current version of the ArcGIS map service.- Returns:
- the current version of the map service
- Since:
- 100.0.0
-
getDescription
Returns the description.- Returns:
- the description
- Since:
- 100.0.0
-
getDocumentInfo
Gets the document information such as the title, author, and comments.- Returns:
- the service document information
- Since:
- 100.0.0
-
isExportTileCacheCompactV2Allowed
public boolean isExportTileCacheCompactV2Allowed()Whether exporting tiles in compact version 2 format (.tpkx) is supported.The export tile cache compact version 2 (.tpkx) format now supersedes the compact (.tpk) format across ArcGIS software. For more information, see
TileCache.StorageFormat.COMPACT_V2
.If this property is true, the map service supports exporting tiles as .tpkx format. If this property is false, the service does not support exporting .tpkx format, and you should check
canExportTiles()
to confirm whether it supports exporting the earlier .tpk format version.Version
10.9 or greater supports exporting tiles as .tpkx. Compact V2 tile caches can also be exported from export-enabled Esri image basemaps and elevation services hosted on ArcGIS Online. For more details on the specification of a .tpkx file format, see https://github.com/Esri/tile-package-spec.- Returns:
- whether exporting tiles in compact version 2 format (.tpkx) is supported.
- Since:
- 100.10.0
- See Also:
-
canExportTiles
public boolean canExportTiles()Whether exporting tiles in compact format (.tpk) is supported.This property indicates whether the map service supports exporting tiles as compact (.tpk) format. Exporting tiles allows you to use them as a basemap, operational layer, or elevation source, without network connectivity. See
TileCache
for information on creating a layer from a local tile cache.To export tiles, you can use either the
ExportTileCacheTask
or theOfflineMapTask
.There are two formats for exporting a tile cache:
- Compact (.tpk) is the legacy format for a tile cache. All services that support
exporting tiles support the .tpk format. See
TileCache.StorageFormat.COMPACT
. - Compact V2 (.tpkx) is the latest format used for exporting tiles. Check
isExportTileCacheCompactV2Allowed()
to confirm whether the service supports this format.
- Returns:
- whether exporting tiles in compact format (.tpk) is supported.
- Since:
- 100.0.0
- See Also:
- Compact (.tpk) is the legacy format for a tile cache. All services that support
exporting tiles support the .tpk format. See
-
getFullExtent
Returns the full extent of the layer.- Returns:
- the full extent of this layer
- Since:
- 100.0.0
-
getInitialExtent
Returns the initial extent of the layer.- Returns:
- the initial extent of the layer
- Since:
- 100.0.0
-
getLayerInfos
Gets the available metadata for sublayers in the service as an unmodifiable list of MapServiceLayerIdInfo objects. This is the metadata that can be retrieved without an additional HTTP request to obtain the layer's full metadata. SeeMapServiceLayerIdInfo
for more information.- Returns:
- an unmodifiable list of MapServiceLayerIdInfo objects
- Since:
- 100.0.0
-
getMapName
Returns the name of the map.- Returns:
- the name of the map
- Since:
- 100.0.0
-
getMaxExportTilesCount
public int getMaxExportTilesCount()Gets the maximum number of tiles that can be exported.- Returns:
- the maximum number of tiles that can be exported
- Since:
- 100.0.0
-
getMaxImageHeight
public int getMaxImageHeight()Returns the max image height in pixels.- Returns:
- the max image height in pixels
- Since:
- 100.0.0
-
getMaxImageWidth
public int getMaxImageWidth()Returns the max image width in pixels.- Returns:
- the max image width in pixels
- Since:
- 100.0.0
-
getMaxRecordCount
public int getMaxRecordCount()Gets the maximum number of records that will be returned at once for a query.- Returns:
- the max record count for a query
- Since:
- 100.0.0
-
getMaxScale
public double getMaxScale()Returns the layers's max scale.- Returns:
- the layers's max scale
- Since:
- 100.0.0
-
getMinScale
public double getMinScale()Returns the layers's min scale.- Returns:
- the layers's min scale
- Since:
- 100.0.0
-
getServiceDescription
Returns ArcGIS map service description.- Returns:
- the service description
- Since:
- 100.0.0
-
getServiceSourceType
Returns the type of web service.- Returns:
- the type of web service
- Since:
- 100.0.0
-
hasSingleFusedMapCache
public boolean hasSingleFusedMapCache()True if the ArcGIS map service has a single fused map cache, false otherwise.This is true if "Single Fused Map Cache" is set to true in the map service ArcGIS REST Services Directory.
- Returns:
- true if the service has a single fused map cache, false otherwise
- Since:
- 100.0.0
-
getSpatialReference
Gets the spatial reference of the map service.- Returns:
- the spatial reference of the map service
- Since:
- 100.0.0
-
getSupportedImageFormatTypes
Gets the image format types supported by this layer when generating a map image.- Returns:
- an unmodifiable list of supported image format types
- Since:
- 100.0.0
-
isSupportsDynamicLayers
public boolean isSupportsDynamicLayers()True if the ArcGIS map service supports dynamic layers, false otherwise.This is true if "Supports Dynamic Layers" is set to true in the map service ArcGIS REST Services Directory.
- Returns:
- true if the service supports dynamic layers, false otherwise
- Since:
- 100.0.0
-
getTableInfos
Gets the available stand-alone tables in the service as an unmodifiable list of MapServiceLayerIdInfo objects.- Returns:
- an unmodifiable list of the table info objects
- Since:
- 100.0.0
-
getTileServers
Gets a list of tile server URLs that can be used to split requests for tiles.- Returns:
- an unmodifiable list of tile servers
- Since:
- 100.0.0
-
getTileInfo
Returns the tile information of this ArcGIS map service.- Returns:
- the tile information of the map service
- Since:
- 100.0.0
-
getTimeInfo
Returns information on the support of time based queries and map requests of this map service. If this map service does not support time based requests, this will be null.- Returns:
- the time information support of this map service
- Since:
- 100.0.0
-
getUnit
Gets the units used by this ArcGIS map service.- Returns:
- the units used by this map service
- Since:
- 100.0.0
-