WebTiledLayer Class

  • WebTiledLayer
  • class Esri::ArcGISRuntime::WebTiledLayer

    A layer that requests images from a tiled image server based on a URL template. More...

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

    Esri::ArcGISRuntime::OpenStreetMapLayer

    This class was introduced in Esri::ArcGISRuntime 100.1.

    Public Functions

    WebTiledLayer(const QString &templateUrl, const QStringList &subDomains, 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 Esri::ArcGISRuntime::TileInfo &tileInfo, const Esri::ArcGISRuntime::Envelope &fullExtent, 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 QStringList &subDomains, Esri::ArcGISRuntime::Credential *credential, QObject *parent = nullptr)
    WebTiledLayer(const QString &templateUrl, const QStringList &subDomains, QObject *parent = nullptr)
    WebTiledLayer(const QString &templateUrl, Esri::ArcGISRuntime::Credential *credential, QObject *parent = nullptr)
    WebTiledLayer(const QString &templateUrl, QObject *parent = nullptr)
    virtual ~WebTiledLayer() override
    QStringList subDomains() const
    QString templateUrl() const

    Detailed Description

    WebTiledLayer 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 level of detail (LOD), column, and row. Extending WebTiledLayer, however, has no such requirement.

    A ErrorType::CommonInvalidArgument exception will be thrown when attempting to load a layer with invalid template URL. 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 prerendered (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/v100/cpp/sample-code/web-tiled-layer/} {Web tiled layer}

    See also Layer.

    Member Function Documentation

    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)

    Constructor that takes a templateUrl, subDomains, tileInfo, fullExtent, credential and an optional parent.

    See the class description for how to format templateUrl and usage of subDomains.

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

    Constructor that takes a templateUrl, subDomains, tileInfo, fullExtent and an optional parent.

    See the class description for how to format templateUrl and usage of subDomains.

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

    Constructor that takes a templateUrl, tileInfo, fullExtent, credential and an optional parent.

    See the class description for how to format templateUrl.

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

    Constructor that takes a templateUrl, tileInfo, fullExtent and an optional parent.

    See the class description for how to format templateUrl.

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

    Constructor that takes a templateUrl, subDomains, credential and an optional parent

    See the class description for how to format templateUrl and usage of subDomains.

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

    Creates a WebTiledLayer object. Constructor that takes a templateUrl, subDomains and an optional parent

    Use this function to create a WebTiledLayer object, which provides a simple way to integrate non-ArcGIS Services as a layer in a map. Since an explicit TileInfo argument is not part of this constructor, the max LOD will be 23 (approximate scale of 70 and resolution of 1.86 cm/pixel). The template URL usually follows a pattern similar to https://{subDomain}.server.org/path/{level}/{col}/{row}.png, where "subDomain" is one of the available string in the sub_domains list, "level" corresponds to a zoom level, "col" represents the tile column, and "row" represents the tile row. The "sub_domains" list must at least 1 string value to use the "subDomain" key in the template URL. 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 web mercator projection, and a full extents of [-180, -85.0511, 180, 85.051].

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

    Constructor that takes a templateUrl, credential and an optional parent.

    See the class description for how to format templateUrl.

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

    Constructor that takes a templateUrl and an optional parent.

    Use this function to create a WebTiledLayer object, which provides a simple way to integrate non-ArcGIS Services as a layer in a map. Since an explicit TileInfo argument is not part of this constructor, the max LOD will be 23 (approximate scale of 70 and resolution of 1.86 cm/pixel). The template URL usually follows a pattern similar to https://server.org/path/{level}/{col}/{row}.png, where "level" corresponds to a zoom level, "col" represents the tile column, and "row" represents the tile row. This URL should be arranged to reflect how the tiles are arranged in the cache or on the server. This URL 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 web mercator projection, and a fullExtents of [-180, -85.0511, 180, 85.051].

    See the class description for how to format templateUrl.

    [override virtual] WebTiledLayer::~WebTiledLayer()

    Destructor.

    QStringList WebTiledLayer::subDomains() const

    Returns the list of sub domains used to construct the layer if specified.

    QString WebTiledLayer::templateUrl() const

    Returns the template url used to construct the layer.

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