Basemap Class

(Esri::ArcGISRuntime::Basemap)

A basemap that can be displayed in a map. More...

Header: #include <Basemap>
Since: Esri::ArcGISRuntime 100.0
Inherits: Object, Loadable, and JsonSerializable

Public Functions

Basemap(QObject *parent = nullptr)
Basemap(Item *item, QObject *parent = nullptr)
Basemap(const QUrl &url, QObject *parent = nullptr)
Basemap(Layer *baseLayer, QObject *parent = nullptr)
Basemap(const QList<Layer *> &baseLayers, const QList<Layer *> &referenceLayers, QObject *parent = nullptr)
~Basemap()
LayerListModel *baseLayers() const
Item *item() const
QString name() const
LayerListModel *referenceLayers() const
void setName(const QString &name)
QUrl url() const

Reimplemented Public Functions

virtual void cancelLoad()
virtual void load()
virtual Error loadError() const
virtual LoadStatus loadStatus() const
virtual void retryLoad()
virtual QString toJson() const
virtual QJsonObject unknownJson() const
virtual QJsonObject unsupportedJson() const

Signals

void doneLoading(Esri::ArcGISRuntime::Error loadError)
void loadStatusChanged(Esri::ArcGISRuntime::LoadStatus loadStatus)

Static Public Members

Basemap *darkGrayCanvasVector(QObject *parent = nullptr)
Basemap *fromJson(const QString &json, QObject *parent = nullptr)
Basemap *imagery(QObject *parent = nullptr)
Basemap *imageryWithLabels(QObject *parent = nullptr)
Basemap *imageryWithLabelsVector(QObject *parent = nullptr)
Basemap *lightGrayCanvas(QObject *parent = nullptr)
Basemap *lightGrayCanvasVector(QObject *parent = nullptr)
Basemap *nationalGeographic(QObject *parent = nullptr)
Basemap *navigationVector(QObject *parent = nullptr)
Basemap *oceans(QObject *parent = nullptr)
Basemap *openStreetMap(QObject *parent = nullptr)
Basemap *streets(QObject *parent = nullptr)
Basemap *streetsNightVector(QObject *parent = nullptr)
Basemap *streetsVector(QObject *parent = nullptr)
Basemap *streetsWithReliefVector(QObject *parent = nullptr)
Basemap *terrainWithLabels(QObject *parent = nullptr)
Basemap *terrainWithLabelsVector(QObject *parent = nullptr)
Basemap *topographic(QObject *parent = nullptr)
Basemap *topographicVector(QObject *parent = nullptr)
  • 10 static public members inherited from QObject

Additional Inherited Members

  • 1 property inherited from QObject
  • 1 public slot inherited from QObject
  • 1 public variable inherited from QObject
  • 9 protected functions inherited from QObject
  • 2 protected variables inherited from QObject

Detailed Description

A basemap that can be displayed in a map.

A basemap provides a background of geographical context for the content you want to display in the map. It is used for locational reference and provides a framework on which you can overlay operational layers, perform analysis, and visualize geographic information. Thus, the basemap serves as a foundation and provides a framework for working with information geographically.

ArcGIS Online provides a number of ready-to-use basemaps for streets, topography, shaded relief, and so on. If you prefer, you can create your own basemap by mashing up layers.

A basemap is composed of a collection of base layers and reference layers. Base layers are displayed at the bottom of a map, and reference layers are displayed at the top, with the map's operational layers sandwiched between them. The content of a basemap is typically static and does not change frequently.

Example:

Add a tiled map service to a map's basemap:

ArcGISTiledLayer* tiledLayer = new ArcGISTiledLayer(streetMapServiceUrl, this);
Basemap* basemap = new Basemap(tiledLayer, this);
Map* map = new Map(basemap, this);

Member Function Documentation

Basemap::Basemap(QObject *parent = nullptr)

Default constructor with an optional parent.

Basemap::Basemap(Item *item, QObject *parent = nullptr)

Construct a Basemap from an item with an optional parent.

Basemap::Basemap(const QUrl &url, QObject *parent = nullptr)

Construct a Basemap from a url with an optional parent.

url may be a direct URL to web map JSON content or the URL of a portal item.

The URL can be one of three possible types:

  • The item details page : http://www.myPortal.com/home/item.html?id=12345678901234567890123456789012
  • The map view page : http://www.myPortal.com/home/webmap/viewer.html?webmap=12345678901234567890123456789012
  • The sharing data page : http://www.myPortal.com/sharing/rest/content/items/12345678901234567890123456789012/data

Basemap::Basemap(Layer *baseLayer, QObject *parent = nullptr)

Construct a Basemap from a baseLayer with an optional parent.

Basemap::Basemap(const QList<Layer *> &baseLayers, const QList<Layer *> &referenceLayers, QObject *parent = nullptr)

Construct a Basemap from baseLayers and referenceLayers with an optional parent.

Basemap::~Basemap()

Destructor.

LayerListModel *Basemap::baseLayers() const

Gets the base layers as a LayerListModel.

Returns The base layers.

[virtual] void Basemap::cancelLoad()

Reimplemented from Loadable::cancelLoad().

See Loadable.

[static] Basemap *Basemap::darkGrayCanvasVector(QObject *parent = nullptr)

Creates a new Basemap based on ArcGIS Online Dark Gray Canvas basemap with an optional parent.

[signal] void Basemap::doneLoading(Esri::ArcGISRuntime::Error loadError)

Signal emitted when Basemap is done loading.

  • loadError - Details about any error that may have occurred.

Note: If there is a load error it will also be emitted on the errorOccurred signal.

See also Loadable and Object.

[static] Basemap *Basemap::fromJson(const QString &json, QObject *parent = nullptr)

Creates a new Basemap from json with an optional parent.

See also JsonSerializable.

[static] Basemap *Basemap::imagery(QObject *parent = nullptr)

Creates a new Basemap based on ArcGIS Online World Imagery basemap with an optional parent.

See also Tiled layers spatial reference.

[static] Basemap *Basemap::imageryWithLabels(QObject *parent = nullptr)

Creates a new Basemap based on ArcGIS Online Imagery with Labels basemap with an optional parent.

See also Tiled layers spatial reference.

[static] Basemap *Basemap::imageryWithLabelsVector(QObject *parent = nullptr)

Creates a new Basemap based on ArcGIS Online Imagery Hybrid vector basemap with an optional parent.

Item *Basemap::item() const

Gets the item.

Returns The item.

[static] Basemap *Basemap::lightGrayCanvas(QObject *parent = nullptr)

Creates a new Basemap based on ArcGIS Online Light Gray Canvas basemap with an optional parent.

See also Tiled layers spatial reference.

[static] Basemap *Basemap::lightGrayCanvasVector(QObject *parent = nullptr)

Creates a new Basemap based on ArcGIS Online Light Gray Canvas vector basemap with an optional parent.

[virtual] void Basemap::load()

Reimplemented from Loadable::load().

See Loadable.

[virtual] Error Basemap::loadError() const

Reimplemented from Loadable::loadError().

See Loadable.

[virtual] LoadStatus Basemap::loadStatus() const

Reimplemented from Loadable::loadStatus().

See Loadable.

[signal] void Basemap::loadStatusChanged(Esri::ArcGISRuntime::LoadStatus loadStatus)

loadStatus See Loadable.

QString Basemap::name() const

Gets the name of the Basemap.

Returns the name.

See also setName().

[static] Basemap *Basemap::nationalGeographic(QObject *parent = nullptr)

Creates a new Basemap based on ArcGIS Online National Geographic World basemap with an optional parent.

See also Tiled layers spatial reference.

Creates a new Basemap based on ArcGIS Online World Navigation Map vector basemap with an optional parent.

[static] Basemap *Basemap::oceans(QObject *parent = nullptr)

Creates a new Basemap based on ArcGIS Online Oceans basemap with an optional parent.

See also Tiled layers spatial reference.

[static] Basemap *Basemap::openStreetMap(QObject *parent = nullptr)

Creates a new Basemap based on ArcGIS Online Open Street Map basemap with an optional parent.

LayerListModel *Basemap::referenceLayers() const

Gets the reference layers as a LayerListModel.

Returns The reference layers.

[virtual] void Basemap::retryLoad()

Reimplemented from Loadable::retryLoad().

See Loadable.

void Basemap::setName(const QString &name)

Sets the name of the Basemap.

  • name - The new Basemap name.

See also name().

[static] Basemap *Basemap::streets(QObject *parent = nullptr)

Creates a new Basemap based on ArcGIS Online World Street basemap with an optional parent.

See also Tiled layers spatial reference.

[static] Basemap *Basemap::streetsNightVector(QObject *parent = nullptr)

Creates a new Basemap based on ArcGIS Online World Street Map Night vector basemap with an optional parent.

[static] Basemap *Basemap::streetsVector(QObject *parent = nullptr)

Creates a new Basemap based on ArcGIS Online World Street Map vector basemap with an optional parent.

[static] Basemap *Basemap::streetsWithReliefVector(QObject *parent = nullptr)

Creates a new Basemap based on ArcGIS Online Streets with Relief vector basemap with an optional parent.

[static] Basemap *Basemap::terrainWithLabels(QObject *parent = nullptr)

Creates a new Basemap based on ArcGIS Online Terrain with Labels basemap with an optional parent.

See also Tiled layers spatial reference.

[static] Basemap *Basemap::terrainWithLabelsVector(QObject *parent = nullptr)

Creates a new Basemap based on ArcGIS Online Terrain with Labels vector basemap with an optional parent.

[virtual] QString Basemap::toJson() const

Reimplemented from JsonSerializable::toJson().

Gets the json representation of this object.

See also JsonSerializable.

[static] Basemap *Basemap::topographic(QObject *parent = nullptr)

Creates a new Basemap based on ArcGIS Online World Topographic basemap with an optional parent.

See also Tiled layers spatial reference.

[static] Basemap *Basemap::topographicVector(QObject *parent = nullptr)

Creates a new Basemap based on ArcGIS Online World Topographic vector basemap with an optional parent.

[virtual] QJsonObject Basemap::unknownJson() const

Reimplemented from JsonSerializable::unknownJson().

Gets the unknown JSON of this object.

See also JsonSerializable.

[virtual] QJsonObject Basemap::unsupportedJson() const

Reimplemented from JsonSerializable::unsupportedJson().

Gets the unsupported JSON of this object.

See also JsonSerializable.

QUrl Basemap::url() const

Gets the URL of the Basemap.

Returns the URL.


Feedback on this topic?