Class ArcGISTiledLayer

    • Constructor Detail

      • ArcGISTiledLayer

        public ArcGISTiledLayer​(PortalItem portalItem)
        Creates a new ArcGISTiledLayer based on a map service PortalItem.

        If the portal item argument is not in LoadStatus#LOADED state it will be loaded automatically when this ArcGISTiledLayer instance is loaded.

        Parameters:
        portalItem - a map service PortalItem
        Throws:
        IllegalArgumentException - if portalItem is null
        Since:
        100.0.0
      • ArcGISTiledLayer

        public ArcGISTiledLayer​(String url)
        Creates a new ArcGIS tiled layer from a map service or map service portal item at the given URL.

        To use a credential, call setCredential(Credential) after this constructor and before loading or using this layer.

        Parameters:
        url - the map service or portal item URL
        Throws:
        IllegalArgumentException - if the URL is null or empty
        Since:
        100.0.0
      • ArcGISTiledLayer

        public ArcGISTiledLayer​(TileCache tileCache)
        Creates a new ArcGIS tiled layer from a tile cache.

        The supported file formats:

        • Tiled Package .tpk, which holds data about tiles (images) from an ArcGISMap wrapped in a single file.
        • Exploded Cache, where each tile is stored in a single file.
        • Compact Cache, where groups of tiles are stored together in large files called bundles.

        Can be used to work with tiled layers offline.

        Parameters:
        tileCache - the tile cache to use
        Throws:
        IllegalArgumentException - if argument is null
        Since:
        100.0.0
    • Method Detail

      • copy

        public ArcGISTiledLayer copy()
        Creates a deep copy of this ArcGISTiledLayer instance.
        Returns:
        a deep copy of this ArcGISTiledLayer instance, which means that copies of all fields of this layer are made including its loading state
        Since:
        100.1.0
      • getRefreshInterval

        public long getRefreshInterval()
        Gets the refresh interval in milliseconds. The refresh interval is the time between automatic layer requests. A value of zero means the layer is never refreshed. The default value is zero.
        Returns:
        the refresh interval in milliseconds
        Since:
        100.1.0
      • setRefreshInterval

        public void setRefreshInterval​(long refreshIntervalMilliseconds)
        Sets the refresh interval in milliseconds. The refresh interval is the time between automatic layer requests. A value of zero means the layer is never refreshed. The default value is zero.
        Parameters:
        refreshIntervalMilliseconds - the refresh interval in milliseconds
        Throws:
        IllegalArgumentException - if milliseconds is less than zero
        Since:
        100.1.0
      • setCredential

        public void setCredential​(Credential credential)
        Sets the credential used to authenticate the user with the tiled layer.
        Specified by:
        setCredential in interface RemoteResource
        Parameters:
        credential - the credential used to authenticate the user with the tiled layer
        Since:
        100.0.0
      • getCredential

        public Credential getCredential()
        Gets the credential used to authenticate the user with the tiled layer.
        Specified by:
        getCredential in interface RemoteResource
        Returns:
        the credential used to authenticate the user with the tiled layer
        Since:
        100.0.0
      • setRequestConfiguration

        public void setRequestConfiguration​(RequestConfiguration requestConfiguration)
        Sets configuration parameters used for network requests sent using this Layer object. The global RequestConfiguration is used if no RequestConfiguration is set.
        Specified by:
        setRequestConfiguration in interface RemoteResource
        Parameters:
        requestConfiguration - object containing the parameters to use
        Since:
        100.0.0
      • getUri

        public String getUri()
        Gets the URL of the tiled layer.
        Specified by:
        getUri in interface RemoteResource
        Returns:
        the URL of the tiled layer
        Since:
        100.0.0
      • getMapServiceInfo

        public ArcGISMapServiceInfo getMapServiceInfo()
        Gets the map service information for this layer.
        Returns:
        map service information for this layer
        Since:
        100.0.0
      • getSublayers

        public ListenableList<ArcGISSublayer> getSublayers()
        Gets the sublayers for this layer.
        Returns:
        an unmodifiable list of ArcGISSublayers
        Since:
        100.2.0
      • getTile

        protected byte[] getTile​(TileKey tileKey)
        Description copied from class: ImageTiledLayer
        Gets the encoded bytes that represents a tile for the given tile key. The encoding must match TileInfo specified in the constructor ImageTiledLayer(TileInfo, Envelope).
        Specified by:
        getTile in class ImageTiledLayer
        Parameters:
        tileKey - key for the expected tile
        Returns:
        the encoded bytes that represent the tile for the given tile key