Basemap Class
A basemap that can be displayed in a map. More...
Header: | #include <Basemap> |
Since: | Esri::ArcGISRuntime 100.0 |
Inherits: | Esri::ArcGISRuntime::Object, Esri::ArcGISRuntime::Loadable, Esri::ArcGISRuntime::JsonSerializable, and Esri::ArcGISRuntime::RemoteResource |
This class was introduced in Esri::ArcGISRuntime 100.0.
Public Functions
Basemap(const QList<Esri::ArcGISRuntime::Layer *> &baseLayers, const QList<Esri::ArcGISRuntime::Layer *> &referenceLayers, QObject *parent = nullptr) | |
Basemap(Esri::ArcGISRuntime::BasemapStyle basemapStyle, Esri::ArcGISRuntime::Credential *credential, QObject *parent = nullptr) | |
Basemap(Esri::ArcGISRuntime::BasemapStyle basemapStyle, QObject *parent = nullptr) | |
Basemap(Esri::ArcGISRuntime::Layer *baseLayer, QObject *parent = nullptr) | |
Basemap(const QUrl &url, QObject *parent = nullptr) | |
Basemap(Esri::ArcGISRuntime::Item *item, QObject *parent = nullptr) | |
Basemap(QObject *parent = nullptr) | |
virtual | ~Basemap() override |
Esri::ArcGISRuntime::LayerListModel * | baseLayers() const |
Esri::ArcGISRuntime::Item * | item() const |
QString | name() const |
Esri::ArcGISRuntime::LayerListModel * | referenceLayers() const |
void | setName(const QString &name) |
Reimplemented Public Functions
virtual void | cancelLoad() override |
virtual Esri::ArcGISRuntime::Credential * | credential() const override |
virtual void | load() override |
virtual Esri::ArcGISRuntime::Error | loadError() const override |
virtual Esri::ArcGISRuntime::LoadStatus | loadStatus() const override |
virtual Esri::ArcGISRuntime::RequestConfiguration | requestConfiguration() const override |
virtual void | retryLoad() override |
virtual void | setRequestConfiguration(const Esri::ArcGISRuntime::RequestConfiguration &requestConfiguration) override |
virtual QString | toJson() const override |
virtual QJsonObject | unknownJson() const override |
virtual QJsonObject | unsupportedJson() const override |
virtual QUrl | url() const override |
Signals
void | doneLoading(Esri::ArcGISRuntime::Error loadError) |
void | loadStatusChanged(Esri::ArcGISRuntime::LoadStatus loadStatus) |
Static Public Members
Esri::ArcGISRuntime::Basemap * | darkGrayCanvasVector(QObject *parent = nullptr) |
Esri::ArcGISRuntime::Basemap * | fromJson(const QString &json, QObject *parent = nullptr) |
Esri::ArcGISRuntime::Basemap * | imagery(QObject *parent = nullptr) |
Esri::ArcGISRuntime::Basemap * | imageryWithLabels(QObject *parent = nullptr) |
Esri::ArcGISRuntime::Basemap * | imageryWithLabelsVector(QObject *parent = nullptr) |
Esri::ArcGISRuntime::Basemap * | lightGrayCanvas(QObject *parent = nullptr) |
Esri::ArcGISRuntime::Basemap * | lightGrayCanvasVector(QObject *parent = nullptr) |
Esri::ArcGISRuntime::Basemap * | nationalGeographic(QObject *parent = nullptr) |
Esri::ArcGISRuntime::Basemap * | navigationVector(QObject *parent = nullptr) |
Esri::ArcGISRuntime::Basemap * | oceans(QObject *parent = nullptr) |
Esri::ArcGISRuntime::Basemap * | openStreetMap(QObject *parent = nullptr) |
Esri::ArcGISRuntime::Basemap * | streets(QObject *parent = nullptr) |
Esri::ArcGISRuntime::Basemap * | streetsNightVector(QObject *parent = nullptr) |
Esri::ArcGISRuntime::Basemap * | streetsVector(QObject *parent = nullptr) |
Esri::ArcGISRuntime::Basemap * | streetsWithReliefVector(QObject *parent = nullptr) |
Esri::ArcGISRuntime::Basemap * | terrainWithLabels(QObject *parent = nullptr) |
Esri::ArcGISRuntime::Basemap * | terrainWithLabelsVector(QObject *parent = nullptr) |
Esri::ArcGISRuntime::Basemap * | topographic(QObject *parent = nullptr) |
Esri::ArcGISRuntime::Basemap * | topographicVector(QObject *parent = nullptr) |
Detailed Description
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.
Typically, you will use one basemap layer that is drawn beneath all other layers, but you can also add a basemap layer on top of all other layers to depict boundaries, labels, or a road network. In order to take advantage of geographically load balanced services and monitor usage with API keys or named users, use Basemap(BasemapStyle, QObject* parent).
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(const QList<Esri::ArcGISRuntime::Layer *> &baseLayers, const QList<Esri::ArcGISRuntime::Layer *> &referenceLayers, QObject *parent = nullptr)
Construct a Basemap from baseLayers and referenceLayers with an optional parent.
Basemap::Basemap(Esri::ArcGISRuntime::BasemapStyle basemapStyle, Esri::ArcGISRuntime::Credential *credential, QObject *parent = nullptr)
Construct a Basemap with a style and a credential.
- basemapStyle - The basemap style.
- credential - the credential to use.
- parent - The optional parent QObject.
This function was introduced in Esri::ArcGISRuntime 100.10.
Basemap::Basemap(Esri::ArcGISRuntime::BasemapStyle basemapStyle, QObject *parent = nullptr)
Construct a Basemap with a style.
- basemapStyle - The basemap style.
- parent - The optional parent QObject.
This function was introduced in Esri::ArcGISRuntime 100.10.
See also BasemapStyle.
Basemap::Basemap(Esri::ArcGISRuntime::Layer *baseLayer, QObject *parent = nullptr)
Construct a Basemap from a baseLayer 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(Esri::ArcGISRuntime::Item *item, QObject *parent = nullptr)
Construct a Basemap from an item with an optional parent.
Basemap::Basemap(QObject *parent = nullptr)
Default constructor 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.
[signal]
void Basemap::loadStatusChanged(Esri::ArcGISRuntime::LoadStatus loadStatus)
loadStatus See Loadable.
[override virtual]
Basemap::~Basemap()
Destructor.
Esri::ArcGISRuntime::LayerListModel *Basemap::baseLayers() const
Gets the base layers as a LayerListModel.
Returns The base layers.
[override virtual]
void Basemap::cancelLoad()
Reimplements: Loadable::cancelLoad().
See Loadable.
[override virtual]
Esri::ArcGISRuntime::Credential *Basemap::credential() const
Reimplements: RemoteResource::credential() const.
Returns the security credential used to access the basemap.
[static]
Esri::ArcGISRuntime::Basemap *Basemap::darkGrayCanvasVector(QObject *parent = nullptr)
Creates a new Basemap based on ArcGIS Online Dark Gray Canvas basemap with an optional parent.
[static]
Esri::ArcGISRuntime::Basemap *Basemap::fromJson(const QString &json, QObject *parent = nullptr)
Creates a new Basemap from json with an optional parent.
See also JsonSerializable.
[static]
Esri::ArcGISRuntime::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]
Esri::ArcGISRuntime::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]
Esri::ArcGISRuntime::Basemap *Basemap::imageryWithLabelsVector(QObject *parent = nullptr)
Creates a new Basemap based on ArcGIS Online Imagery Hybrid vector basemap with an optional parent.
Esri::ArcGISRuntime::Item *Basemap::item() const
Gets the item.
Returns The item.
[static]
Esri::ArcGISRuntime::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]
Esri::ArcGISRuntime::Basemap *Basemap::lightGrayCanvasVector(QObject *parent = nullptr)
Creates a new Basemap based on ArcGIS Online Light Gray Canvas vector basemap with an optional parent.
[override virtual]
void Basemap::load()
Reimplements: Loadable::load().
See Loadable.
[override virtual]
Esri::ArcGISRuntime::Error Basemap::loadError() const
Reimplements: Loadable::loadError() const.
See Loadable.
[override virtual]
Esri::ArcGISRuntime::LoadStatus Basemap::loadStatus() const
Reimplements: Loadable::loadStatus() const.
See Loadable.
QString Basemap::name() const
Gets the name of the Basemap.
Returns the name.
See also setName().
[static]
Esri::ArcGISRuntime::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.
[static]
Esri::ArcGISRuntime::Basemap *Basemap::navigationVector(QObject *parent = nullptr)
Creates a new Basemap based on ArcGIS Online World Navigation Map vector basemap with an optional parent.
[static]
Esri::ArcGISRuntime::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]
Esri::ArcGISRuntime::Basemap *Basemap::openStreetMap(QObject *parent = nullptr)
Creates a new Basemap based on ArcGIS Online Open Street Map basemap with an optional parent.
Esri::ArcGISRuntime::LayerListModel *Basemap::referenceLayers() const
Gets the reference layers as a LayerListModel.
Returns The reference layers.
[override virtual]
Esri::ArcGISRuntime::RequestConfiguration Basemap::requestConfiguration() const
Reimplements: RemoteResource::requestConfiguration() const.
Returns the RequestConfiguration in use by this basemap.
This function was introduced in Esri::ArcGISRuntime 100.10.
See also setRequestConfiguration().
[override virtual]
void Basemap::retryLoad()
Reimplements: Loadable::retryLoad().
See Loadable.
void Basemap::setName(const QString &name)
Sets the name of the Basemap.
- name - The new Basemap name.
See also name().
[override virtual]
void Basemap::setRequestConfiguration(const Esri::ArcGISRuntime::RequestConfiguration &requestConfiguration)
Reimplements: RemoteResource::setRequestConfiguration(const Esri::ArcGISRuntime::RequestConfiguration &requestConfiguration).
Sets configuration parameters used for network requests sent by this basemap to requestConfiguration.
This function was introduced in Esri::ArcGISRuntime 100.10.
See also requestConfiguration().
[static]
Esri::ArcGISRuntime::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]
Esri::ArcGISRuntime::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]
Esri::ArcGISRuntime::Basemap *Basemap::streetsVector(QObject *parent = nullptr)
Creates a new Basemap based on ArcGIS Online World Street Map vector basemap with an optional parent.
[static]
Esri::ArcGISRuntime::Basemap *Basemap::streetsWithReliefVector(QObject *parent = nullptr)
Creates a new Basemap based on ArcGIS Online Streets with Relief vector basemap with an optional parent.
[static]
Esri::ArcGISRuntime::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]
Esri::ArcGISRuntime::Basemap *Basemap::terrainWithLabelsVector(QObject *parent = nullptr)
Creates a new Basemap based on ArcGIS Online Terrain with Labels vector basemap with an optional parent.
[override virtual]
QString Basemap::toJson() const
Reimplements: JsonSerializable::toJson() const.
Gets the json representation of this object.
See also JsonSerializable.
[static]
Esri::ArcGISRuntime::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]
Esri::ArcGISRuntime::Basemap *Basemap::topographicVector(QObject *parent = nullptr)
Creates a new Basemap based on ArcGIS Online World Topographic vector basemap with an optional parent.
[override virtual]
QJsonObject Basemap::unknownJson() const
Reimplements: JsonSerializable::unknownJson() const.
Gets the unknown JSON of this object.
See also JsonSerializable.
[override virtual]
QJsonObject Basemap::unsupportedJson() const
Reimplements: JsonSerializable::unsupportedJson() const.
Gets the unsupported JSON of this object.
See also JsonSerializable.
[override virtual]
QUrl Basemap::url() const
Reimplements: RemoteResource::url() const.
Gets the URL of the Basemap.
Returns the URL.