Skip to content

ServiceImageTiledLayer Class

  • ServiceImageTiledLayer
  • class Esri::ArcGISRuntime::ServiceImageTiledLayer

    A super class for all image tiled layers that fetch map tiles from a remote service. More...

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

    Esri::ArcGISRuntime::BingMapsLayer and Esri::ArcGISRuntime::WebTiledLayer

    Public Functions

    (since Esri::ArcGISRuntime 100.2) ServiceImageTiledLayer(const Esri::ArcGISRuntime::TileInfo &tileInfo, const Esri::ArcGISRuntime::Envelope &fullExtent, QObject *parent = nullptr)
    virtual ~ServiceImageTiledLayer() override

    Reimplemented Public Functions

    (deprecated) virtual Esri::ArcGISRuntime::Credential *credential() const override
    (deprecated) virtual Esri::ArcGISRuntime::RequestConfiguration requestConfiguration() const override
    (deprecated) virtual void setRequestConfiguration(const Esri::ArcGISRuntime::RequestConfiguration &requestConfiguration) override
    (deprecated) virtual QUrl url() const override

    Signals

    (since Esri::ArcGISRuntime 100.2) void tileUrlRequest(const Esri::ArcGISRuntime::TileKey &tileKey)

    Protected Functions

    (since Esri::ArcGISRuntime 100.2) void setTileUrl(const Esri::ArcGISRuntime::TileKey &tileKey, const QUrl &url)

    Detailed Description

    Allows you to have a custom service image tiled layer. For a given LOD, column and row your custom service image tiled layer will be called to generate a request (requestConfiguration()). Once you set the request information (setRequestConfiguration(const Esri::ArcGISRuntime::RequestConfiguration&)) then the request will be sent over the network for you.

    The service image tiled layer class is derived from the image tiled layer class.

    CustomServiceTiledLayer::CustomServiceTiledLayer(const TileInfo& tileInfo, const Envelope& fullExtent, QObject* parent) :
      ServiceImageTiledLayer(tileInfo, fullExtent, parent)
    {
      connect(this, &CustomServiceTiledLayer::tileUrlRequest, this, [this](const TileKey& tileKey)
      {
        setTileUrl(tileKey, QUrl(QString("http://tile.openstreetmap.org/%1/%2/%3.png").arg(
                              QString::number(tileKey.level()),
                              QString::number(tileKey.column()),
                              QString::number(tileKey.row()))));
      });
    }

    Network requesting, downloading images and rendering are done internally.

    Note: The URL supplied must be a valid online image URL. If the URL is not valid or if the image format does not match the tile info, ServiceImageTiledLayer will emit an error.

    See also Layer.

    Member Function Documentation

    [since Esri::ArcGISRuntime 100.2] ServiceImageTiledLayer::ServiceImageTiledLayer(const Esri::ArcGISRuntime::TileInfo &tileInfo, const Esri::ArcGISRuntime::Envelope &fullExtent, QObject *parent = nullptr)

    Creates a tile service layer object.

    • tileInfo - A tile info object.
    • fullExtent - The full extent of the layer.
    • parent - The optional parent QObject.

    This function was introduced in Esri::ArcGISRuntime 100.2.

    [override virtual noexcept] ServiceImageTiledLayer::~ServiceImageTiledLayer()

    Destructor.

    [protected, since Esri::ArcGISRuntime 100.2] void ServiceImageTiledLayer::setTileUrl(const Esri::ArcGISRuntime::TileKey &tileKey, const QUrl &url)

    Set the URL corresponding to the requested tileKey to url.

    Note: This function should only be called when implementing your own custom service image tiled layer type.

    This function was introduced in Esri::ArcGISRuntime 100.2.

    [signal, since Esri::ArcGISRuntime 100.2] void ServiceImageTiledLayer::tileUrlRequest(const Esri::ArcGISRuntime::TileKey &tileKey)

    Signal emitted when a tile URL is requested.

    • tileKey - The key used to identify the specific tile.

    Note: : React to this signal when implementing your own custom service image tiled layer type.

    This function was introduced in Esri::ArcGISRuntime 100.2.

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