ArcGIS Developers

OpenStreetMapLayer Class

class Esri::ArcGISRuntime::OpenStreetMapLayer

A layer that requests images from OpenStreetMap servers. More...

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

This class was introduced in Esri::ArcGISRuntime 100.1.

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 and WebTiledLayer.

Member Function Documentation

OpenStreetMapLayer::OpenStreetMapLayer(QObject *parent = nullptr)

Constructor that takes an optional parent.

[override virtual] OpenStreetMapLayer::~OpenStreetMapLayer()


[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.

Feedback on this topic?