Maps
Each layer
Basemap layers
A basemap is the foundational layer and data that provides the overall visual and geographic context for a map
A basemap is composed of a collection of base layers and reference layers
The basemap styles service
// Set the ArcGIS runtime environment Api Key with your access token. ArcGISRuntimeEnvironment::setApiKey("YOUR_ACCESS_TOKEN");
// Set the base map for for the map to be the basemap style of ArcGISNavigation. m_map = new Map(BasemapStyle::ArcGISNavigation, this);
// Use any of the available BasemapStyle values like: // m_map = new Map(BasemapStyle::ArcGISHillshadeLight, this); // m_map = new Map(BasemapStyle::ArcGISHillshadeDark, this); // ... there are several others. // Set the ArcGIS runtime environment Api Key with your access token. ArcGISRuntimeEnvironment::setApiKey("YOUR_ACCESS_TOKEN");
// Set the base map for for the map to be the basemap style of ArcGISImagery. m_map = new Map(BasemapStyle::ArcGISImagery, this);Data layers
A data layer
A data layer
The data for a data layer
A data layer can also be created from a dataset stored on the device
To add a data layer
void Layers::loadMapLayers(){ // Set the access token. const QString accessToken = QStringLiteral("YOUR_ACCESS_TOKEN");
// Set the ArcGIS runtime environment Api Key with your access token. ArcGISRuntimeEnvironment::setApiKey(accessToken);
// Create a new "trail heads" feature layer based on a service feature table (using the Url provided). FeatureLayer* trailheadsLayer = new FeatureLayer( new ServiceFeatureTable(QUrl("https://services3.arcgis.com/GVgbJbqm8hXASVYi/arcgis/rest/services/Trailheads_Styled/FeatureServer/0"), this), this );
// Create a new "trails" feature layer based on a service feature table (using the Url provided). FeatureLayer* trailsLayer = new FeatureLayer( new ServiceFeatureTable(QUrl("https://services3.arcgis.com/GVgbJbqm8hXASVYi/arcgis/rest/services/Trails_Styled/FeatureServer/0"), this), this );
// Create a new "open spaces" feature layer based on a service feature table (using the Url provided). FeatureLayer* openSpacesLayer = new FeatureLayer( new ServiceFeatureTable(QUrl("https://services3.arcgis.com/GVgbJbqm8hXASVYi/arcgis/rest/services/Parks_and_Open_Space_Styled/FeatureServer/0"), this), this );
// Add the three feature layers to the map's operating layers list model collection. m_map->operationalLayers()->append(trailheadsLayer); m_map->operationalLayers()->append(trailsLayer); m_map->operationalLayers()->append(openSpacesLayer);}Use API key access tokens
An API key access tokenApiKeyResource.
Tutorials
Samples
Feature layer (feature service)
Group layers
Scene layer
Manage operational layers