Class ArcGISMapServiceInfo

  • All Implemented Interfaces:
    JsonSerializable

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

      • 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
        If this object was created from JSON, this method gets unknown data from the source JSON. Unknown JSON is a Map of values that were in the source JSON but are not known by the Runtime and therefore not exposed in the API.
        Specified by:
        getUnknownJson in interface JsonSerializable
        Returns:
        an unmodifiable Map containing unknown JSON data. The keys are Strings containing names. The types of the values depend on the types of tokens within the JSON as follows:
        • a Map<String, Object> represents an object in the JSON
        • a List<Object> represents an array in the JSON
        • a String represents a string in the JSON
        • a Double represents a number in the JSON
        • a Boolean represents true or false in the JSON
        • null represents null in the JSON
      • getUnsupportedJson

        public Map<String,​Object> getUnsupportedJson()
        Description copied from interface: JsonSerializable
        If this object was created from JSON, this method gets unsupported data from the source JSON. Unsupported JSON is a Map of values that are supported by webmaps and known to the version of the webmap specification the API supports (see system requirements), but are not explicitly exposed through the Runtime API.
        Specified by:
        getUnsupportedJson in interface JsonSerializable
        Returns:
        an unmodifiable Map containing unsupported JSON data. The keys are Strings containing names. The types of the values depend on the types of tokens within the JSON as follows:
        • a Map<String, Object> represents an object in the JSON
        • a List<Object> represents an array in the JSON
        • a String represents a string in the JSON
        • a Double represents a number in the JSON
        • a Boolean represents true or false in the JSON
        • null represents null in the 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 the ArcGIS platform. 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:
        TileCache.StorageFormat
      • 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:

        • 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, and is widely used across the ArcGIS platform. 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:
        TileCache.StorageFormat
      • 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()
        Returns true if the ArcGIS map service has a single fused map cache, false otherwise.
        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()
        Returns true if the ArcGIS map service supports dynamic layers, false otherwise.
        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