Class ArcGISMapServiceInfo

java.lang.Object
com.esri.arcgisruntime.arcgisservices.ArcGISMapServiceInfo
All Implemented Interfaces:
JsonSerializable

public final class ArcGISMapServiceInfo extends Object implements JsonSerializable
The map service metadata for an ArcGIS Map Service.
Since:
100.0.0
  • Method Details

    • fromJson

      public static ArcGISMapServiceInfo fromJson(String json)
      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

      public String 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 interface JsonSerializable
      Returns:
      a JSON string
    • getUnknownJson

      public Map<String,Object> 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 interface JsonSerializable
      Returns:
      an unmodifiable Map containing unknown data from the source JSON
    • getUnsupportedJson

      public Map<String,Object> 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 interface JsonSerializable
      Returns:
      an unmodifiable Map containing unsupported data from the source JSON
    • getUrl

      public String getUrl()
      Gets the map service URL.
      Returns:
      the map service URL.
      Since:
      100.0.0
    • getAttribution

      public String getAttribution()
      Returns the attribution of this ArcGIS Map Service.
      Returns:
      the attribution of this ArcGIS Map Service
      Since:
      100.0.0
    • getCapabilities

      public MapServiceCapabilities getCapabilities()
      Returns the map service's capabilities.
      Returns:
      the map service's capabilities
    • getCurrentVersion

      public String getCurrentVersion()
      Returns the current version of the ArcGIS map service.
      Returns:
      the current version of the map service
      Since:
      100.0.0
    • getDescription

      public String getDescription()
      Returns the description.
      Returns:
      the description
      Since:
      100.0.0
    • getDocumentInfo

      public ServiceDocumentInfo getDocumentInfo()
      Gets information about the map service.
      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.

      ArcGIS Server/Enterprise getCurrentVersion(), 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 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 the OfflineMapTask.

      There are two formats for exporting a tile cache:

      Returns:
      whether exporting tiles in compact format (.tpk) is supported.
      Since:
      100.0.0
      See Also:
    • getFullExtent

      public Envelope getFullExtent()
      Returns the full extent of the layer.
      Returns:
      the full extent of this layer
      Since:
      100.0.0
    • getInitialExtent

      public Envelope getInitialExtent()
      Returns the initial extent of the layer.
      Returns:
      the initial extent of the layer
      Since:
      100.0.0
    • getLayerInfos

      public List<MapServiceLayerIdInfo> 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. See MapServiceLayerIdInfo for more information.
      Returns:
      an unmodifiable list of MapServiceLayerIdInfo objects
      Since:
      100.0.0
    • getMapName

      public String 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

      public String getServiceDescription()
      Returns ArcGIS map service description.
      Returns:
      the service description
      Since:
      100.0.0
    • getServiceSourceType

      public ServiceSourceType 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

      public SpatialReference getSpatialReference()
      Gets the spatial reference of the map service.
      Returns:
      the spatial reference of the map service
      Since:
      100.0.0
    • getSupportedImageFormatTypes

      public List<String> 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

      public List<IdInfo> 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

      public List<String> 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

      public TileInfo getTileInfo()
      Returns the tile information of this ArcGIS map service.
      Returns:
      the tile information of the map service
      Since:
      100.0.0
    • getTimeInfo

      public ServiceTimeInfo 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

      public Unit getUnit()
      Gets the units used by this ArcGIS map service.
      Returns:
      the units used by this map service
      Since:
      100.0.0