WebTiledLayer Class

  • WebTiledLayer
  • class Esri::ArcGISRuntime::WebTiledLayer

    A layer that can visualize image tiles from non-ArcGIS web services or local tile caches based on a URL template. More...

    Header: #include <WebTiledLayer.h>
    Since: Esri::ArcGISRuntime 100.1
    Inherits: Esri::ArcGISRuntime::ServiceImageTiledLayer
    Inherited By:

    Esri::ArcGISRuntime::OpenStreetMapLayer

    Public Functions

    WebTiledLayer(const QString &templateUrl, QObject *parent = nullptr)
    WebTiledLayer(const QString &templateUrl, Esri::ArcGISRuntime::Credential *credential, QObject *parent = nullptr)
    WebTiledLayer(const QString &templateUrl, const QStringList &subDomains, QObject *parent = nullptr)
    WebTiledLayer(const QString &templateUrl, const QStringList &subDomains, Esri::ArcGISRuntime::Credential *credential, QObject *parent = nullptr)
    WebTiledLayer(const QString &templateUrl, const Esri::ArcGISRuntime::TileInfo &tileInfo, const Esri::ArcGISRuntime::Envelope &fullExtent, QObject *parent = nullptr)
    WebTiledLayer(const QString &templateUrl, const Esri::ArcGISRuntime::TileInfo &tileInfo, const Esri::ArcGISRuntime::Envelope &fullExtent, Esri::ArcGISRuntime::Credential *credential, QObject *parent = nullptr)
    WebTiledLayer(const QString &templateUrl, const QStringList &subDomains, const Esri::ArcGISRuntime::TileInfo &tileInfo, const Esri::ArcGISRuntime::Envelope &fullExtent, QObject *parent = nullptr)
    WebTiledLayer(const QString &templateUrl, const QStringList &subDomains, const Esri::ArcGISRuntime::TileInfo &tileInfo, const Esri::ArcGISRuntime::Envelope &fullExtent, Esri::ArcGISRuntime::Credential *credential, QObject *parent = nullptr)
    virtual ~WebTiledLayer() override
    QStringList subDomains() const
    QString templateUrl() const

    Detailed Description

    This layer provides a simple way to integrate non-ArcGIS Services as a layer in a map. The URL template usually follows a pattern similar to https://{subDomain}.server.org/path/{level}/{col}/{row}.png, where:

    • "subDomain" is one of the strings in the subDomains list
    • "level" corresponds to a zoom level
    • "col" represents the column of the tile
    • "row" represents the row of the tile

    The URL should be arranged to reflect how the tiles are organized in the cache or on the server, and can point to a web server (https://) or to a local file cache (file://).

    The tiles retrieved by this class are accessed directly by URL. Because the service is only providing images, you are responsible for manually setting the attribution text on the map or scene view.

    To create a custom service tiled layer whose URL follows the above pattern (or a similar pattern), you can extend this class. Alternatively, you can extend the super class ServiceImageTiledLayer, in which you implement a required method to set the request information for a given LOD, column, and row. Extending WebTiledLayer, however, has no such requirement.

    A ErrorType::CommonInvalidArgument error will be emitted when attempting to load a layer with invalid URL template.

    If TileInfo is not specified, tiles are assumed to be in the OpenStreetMap tiling scheme, with 256x256 PNG tiles at 96 DPI, the WebMercator projection, and a FullExtent of [-180, -85.0511, 180, 85.051].

    Functional characteristics

    Tiles are fetched on demand using the specified URL template. Tiles are typically rendered and cached on the server but may be generated on demand by some services. Web tiled layers do not support identify, query, selection, or time.

    Specifying subdomains from which the layer will request tiles allows the load to be more evenly distributed among servers.

    Performance characteristics

    Web tiled layer requires a connection to the service at all times. Performance is similar to other raster tile layers.

    See sample: {https://developers.arcgis.com/qt/latest/cpp/sample-code/web-tiled-layer/} {Web tiled layer}

    See also Layer.

    Member Function Documentation

    [explicit] WebTiledLayer::WebTiledLayer(const QString &templateUrl, QObject *parent = nullptr)

    Creates a web tiled layer with the given URL template.

    • templateUrl - A URL template for tile requests.
    • parent - The optional parent QObject.

    Use this constructor to create a WebTiledLayer to integrate non-ArcGIS Services as a layer in a map. Since this constructor does not require an explicit TileInfo argument, the max LOD will be 23 (approximate scale of 70 and resolution of 1.86 cm/pixel). The URL template usually follows a pattern similar to https://server.org/path/{level}/{col}/{row}.png, where:

    • "level" corresponds to a zoom level.
    • "col" represents the column of the tile.
    • "row" represents the row of the tile.

    The URL should be arranged to reflect how the tiles are arranged in the cache or on the server, and can point to a web server (https://) or to a local file cache (file://).

    The tiles are assumed to be in the OpenStreetMap tiling scheme, with 256x256 PNG tiles at 96 DPI, the webMercator projection, and an extent of [-180, -85.0511, 180, 85.051].

    TileInfo and Layer::fullExtent are set to OpenStreetMap-compatible defaults, and subDomains is left empty.

    WebTiledLayer::WebTiledLayer(const QString &templateUrl, Esri::ArcGISRuntime::Credential *credential, QObject *parent = nullptr)

    Creates a web tiled layer with the given URL template.

    • templateUrl - A URL template for tile requests.
    • credential - The credential for the secured resource.
    • parent - The optional parent QObject.

    Use this constructor to create a WebTiledLayer to integrate non-ArcGIS Services as a layer in a map. Since this constructor does not require an explicit TileInfo argument, the max LOD will be 23 (approximate scale of 70 and resolution of 1.86 cm/pixel). The URL template usually follows a pattern similar to https://server.org/path/{level}/{col}/{row}.png, where:

    • "level" corresponds to a zoom level.
    • "col" represents the column of the tile.
    • "row" represents the row of the tile.

    The URL should be arranged to reflect how the tiles are arranged in the cache or on the server, and can point to a web server (https://) or to a local file cache (file://).

    The tiles are assumed to be in the OpenStreetMap tiling scheme, with 256x256 PNG tiles at 96 DPI, the webMercator projection, and an extent of [-180, -85.0511, 180, 85.051].

    TileInfo and Layer::fullExtent are set to OpenStreetMap-compatible defaults, and subDomains is left empty.

    WebTiledLayer::WebTiledLayer(const QString &templateUrl, const QStringList &subDomains, QObject *parent = nullptr)

    Creates a web tiled layer with the given URL template and collection of subdomains.

    • templateUrl - A URL template for tile requests.
    • subDomains - A collection of strings listing available subdomains.
    • parent - The optional parent QObject.

    Use this constructor to create a WebTiledLayer to integrate non-ArcGIS Services as a layer in a map. Since this constructor does not require an explicit TileInfo argument, the max LOD will be 23 (approximate scale of 70 and resolution of 1.86 cm/pixel). The URL template usually follows a pattern similar to https://{subDomain}.server.org/path/{level}/{col}/{row}.png, where:

    • "subDomain" is one of the strings in the subDomains collection
    • "level" corresponds to a zoom level
    • "col" represents the column of the tile
    • "row" represents the row of the tile

    The subDomains collection must contain at least 1 string value to use the "subDomain" key in the URL template. The URL should be arranged to reflect how the tiles are arranged in the cache or on the server, and can point to a web server (https://) or to a local file cache (file://).

    The tiles are assumed to be in the OpenStreetMap tiling scheme, with 256x256 PNG tiles at 96 DPI, the webMercator projection, and an extent of [-180, -85.0511, 180, 85.051]. TileInfo and Layer::fullExtent are set to OpenStreetMap-compatible defaults.

    WebTiledLayer::WebTiledLayer(const QString &templateUrl, const QStringList &subDomains, Esri::ArcGISRuntime::Credential *credential, QObject *parent = nullptr)

    Creates a web tiled layer with the given URL template and collection of subdomains.

    • templateUrl - A URL template for tile requests.
    • subDomains - A collection of strings listing available subdomains.
    • credential - The credential for the secured resource.
    • parent - The optional parent QObject.

    Use this constructor to create a WebTiledLayer to integrate non-ArcGIS Services as a layer in a map. Since this constructor does not require an explicit TileInfo argument, the max LOD will be 23 (approximate scale of 70 and resolution of 1.86 cm/pixel). The URL template usually follows a pattern similar to https://{subDomain}.server.org/path/{level}/{col}/{row}.png, where:

    • "subDomain" is one of the strings in the subDomains collection
    • "level" corresponds to a zoom level
    • "col" represents the column of the tile
    • "row" represents the row of the tile

    The subDomains collection must contain at least 1 string value to use the "subDomain" key in the URL template. The URL should be arranged to reflect how the tiles are arranged in the cache or on the server, and can point to a web server (https://) or to a local file cache (file://).

    The tiles are assumed to be in the OpenStreetMap tiling scheme, with 256x256 PNG tiles at 96 DPI, the webMercator projection, and an extent of [-180, -85.0511, 180, 85.051]. TileInfo and Layer::fullExtent are set to OpenStreetMap-compatible defaults.

    WebTiledLayer::WebTiledLayer(const QString &templateUrl, const Esri::ArcGISRuntime::TileInfo &tileInfo, const Esri::ArcGISRuntime::Envelope &fullExtent, QObject *parent = nullptr)

    Creates a web tiled layer with the specified URL template, tiling scheme information, and extent.

    • templateUrl - A URL template for tile requests.
    • tileInfo - The tiling scheme info.
    • fullExtent - The full extent of tiles in the cache or server.
    • parent - The optional parent QObject.

    Use this constructor to create a WebTiledLayer to integrate non-ArcGIS Services as a layer in a map. The URL template usually follows a pattern similar to https://server.org/path/{level}/{col}/{row}.png, where:

    • "level" corresponds to a zoom level
    • "col" represents the column of the tile
    • "row" represents the row of the tile

    The URL should be arranged to reflect how the tiles are arranged in the cache or on the server, and can point to a web server (https://) or to a local file cache (file://). subDomains is left empty.

    WebTiledLayer::WebTiledLayer(const QString &templateUrl, const Esri::ArcGISRuntime::TileInfo &tileInfo, const Esri::ArcGISRuntime::Envelope &fullExtent, Esri::ArcGISRuntime::Credential *credential, QObject *parent = nullptr)

    Creates a web tiled layer with the specified URL template, tiling scheme information, and extent.

    • templateUrl - A URL template for tile requests.
    • tileInfo - The tiling scheme info.
    • fullExtent - The full extent of tiles in the cache or server.
    • credential - The credential for the secured resource.
    • parent - The optional parent QObject.

    Use this constructor to create a WebTiledLayer to integrate non-ArcGIS Services as a layer in a map. The URL template usually follows a pattern similar to https://server.org/path/{level}/{col}/{row}.png, where:

    • "level" corresponds to a zoom level
    • "col" represents the column of the tile
    • "row" represents the row of the tile

    The URL should be arranged to reflect how the tiles are arranged in the cache or on the server, and can point to a web server (https://) or to a local file cache (file://). subDomains is left empty.

    WebTiledLayer::WebTiledLayer(const QString &templateUrl, const QStringList &subDomains, const Esri::ArcGISRuntime::TileInfo &tileInfo, const Esri::ArcGISRuntime::Envelope &fullExtent, QObject *parent = nullptr)

    Creates a web tiled layer with the given URL template, subdomain collection, tiling scheme information, and extent.

    • templateUrl - A URL template for tile requests.
    • subDomains - A collection of strings listing available subdomains.
    • tileInfo - The tiling scheme info.
    • fullExtent - The full extent of tiles in the cache or server.
    • parent - The optional parent QObject.

    Use this constructor to create a WebTiledLayer to integrate non-ArcGIS Services as a layer in a map. The URL template usually follows a pattern similar to https://{subDomain}.server.org/path/{level}/{col}/{row}.png, where:

    • "subDomain" is one of the strings in the subDomains list.
    • "level" corresponds to a zoom level.
    • "col" represents the column of the tile.
    • "row" represents the row of the tile.

    The subDomains collection must contain at least 1 string value to use the "subDomain" key in the URL template. The URL should be arranged to reflect how the tiles are arranged in the cache or on the server, and can point to a web server (https://) or to a local file cache (file://).

    WebTiledLayer::WebTiledLayer(const QString &templateUrl, const QStringList &subDomains, const Esri::ArcGISRuntime::TileInfo &tileInfo, const Esri::ArcGISRuntime::Envelope &fullExtent, Esri::ArcGISRuntime::Credential *credential, QObject *parent = nullptr)

    Creates a web tiled layer with the given URL template, subdomain collection, tiling scheme information, and extent.

    • templateUrl - A URL template for tile requests.
    • subDomains - A collection of strings listing available subdomains.
    • tileInfo - The tiling scheme info.
    • fullExtent - The full extent of tiles in the cache or server.
    • credential - The credential for the secured resource.
    • parent - The optional parent QObject.

    Use this constructor to create a WebTiledLayer to integrate non-ArcGIS Services as a layer in a map. The URL template usually follows a pattern similar to https://{subDomain}.server.org/path/{level}/{col}/{row}.png, where:

    • "subDomain" is one of the strings in the subDomains list.
    • "level" corresponds to a zoom level.
    • "col" represents the column of the tile.
    • "row" represents the row of the tile.

    The subDomains collection must contain at least 1 string value to use the "subDomain" key in the URL template. The URL should be arranged to reflect how the tiles are arranged in the cache or on the server, and can point to a web server (https://) or to a local file cache (file://).

    [override virtual] WebTiledLayer::~WebTiledLayer()

    Destructor.

    QStringList WebTiledLayer::subDomains() const

    Returns the collection of subdomains that can be used for the "{subDomain}" key in the templateUrl.

    At least one subdomain must be provided if the templateUrl contains a {subDomain} key. Note: the value of subDomains cannot be changed after this layer was loaded.

    QString WebTiledLayer::templateUrl() const

    Returns the URL template for the this web tiled layer.

    The template uses the {subDomain} (optional), {level}, {row}, and {col} keys to note how the layer should construct the URL for requesting individual tiles. The URL should be arranged to reflect how the tiles are arranged in the cache or on the server, and can point to a web server (https://) or to a local file cache (file://). Note: the value of templateUrl cannot be changed after this layer was loaded.

    See also QString.

    Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.