OpenStreetMapLayer Class

  • OpenStreetMapLayer
  • class Esri::ArcGISRuntime::OpenStreetMapLayer

    A layer that can visualize images from the OpenStreetMap servers. More...

    Header: #include <OpenStreetMapLayer.h>
    Since: Esri::ArcGISRuntime 100.1
    Inherits: Esri::ArcGISRuntime::WebTiledLayer

    Public Functions

    OpenStreetMapLayer(QObject *parent = nullptr)
    virtual ~OpenStreetMapLayer() override

    Reimplemented Public Functions

    virtual void setAttribution(const QString &attribution) override

    Detailed Description

    OpenStreetMap (OSM) is a project to create a free, publicly editable map of the world. This layer displays map content from OpenStreetMap.

    An OpenStreetMapLayer is a preconfigured WebTiledLayer. But unlike a web tiled layer, it comes with predefined attribution and does not support identify, query, selection, or time. Performance of OSM layers is similar to web tiled layer performance. Raster tiles are read from the service as needed by the map.

    Use of OpenStreetMap's tiles is subject to their tile usage policy. Consider the following before using an OpenStreetMap layer in your app:

    • Service availability is not guaranteed. Apps with high demand may be denied access at any time.
    • There are many organizations providing OpenStreetMap tiles. Consider using one of these services (or hosting your own) if you anticipate high demand.

    See sample: OpenStreetMap layer

    See also Layer.

    Member Function Documentation

    [explicit] OpenStreetMapLayer::OpenStreetMapLayer(QObject *parent = nullptr)

    Creates an OpenStreetMap layer from the default OpenStreetMap servers.

    • parent - The optional parent QObject.

    [override virtual] OpenStreetMapLayer::~OpenStreetMapLayer()

    Destructor.

    [override virtual] void OpenStreetMapLayer::setAttribution(const QString &attribution)

    Reimplements: ImageTiledLayer::setAttribution(const QString &attribution).

    The attribution for OpenStreetMapLayer may not be changed.

    This function is disabled for OpenStreetMapLayer. Calling this will output a warning on the console and the function has no effect.

    attribution is ignored.

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