Maps
Each layer
Basemap layers
A basemap layer
A basemap layer provides the visual foundation for a mapping application. It typically contains data with global coverage and is the first layer added to a map or scene. The main data source for a basemap layer is the basemap styles service
The basemap styles service
// Authenticate with an API key access token or user authentication is required to access basemaps// and other location services.ArcGISRuntimeEnvironment.setApiKey("YOUR_ACCESS_TOKEN");
// Create a map and initialize with a vector tile basemap.ArcGISMap vectorBasemap = new ArcGISMap(BasemapStyle.ARCGIS_NAVIGATION);//ArcGISMap vectorBasemap = new ArcGISMap(BasemapStyle.ARCGIS_TOPOGRAPHIC);//ArcGISMap vectorBasemap = new ArcGISMap(BasemapStyle.ARCGIS_LIGHT_GRAY);// Create a map and initialize with an image tile basemap.ArcGISMap imageBasemap = new ArcGISMap(BasemapStyle.ARCGIS_IMAGERY_STANDARD);// ArcGISMap imageBasemap = new ArcGISMap(BasemapStyle.ARCGIS_HILLSHADE_LIGHT);// ArcGISMap imageBasemap = new ArcGISMap(BasemapStyle.ARCGIS_HILLSHADE_DARK);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
// Create a map with the standard imagery basemap style.ArcGISMap map = new ArcGISMap(BasemapStyle.ARCGIS_IMAGERY_STANDARD);
// Create a new trail heads feature layer from its URL.FeatureLayer trailheadsLayer = new FeatureLayer(new ServiceFeatureTable(trailheadsURL));// Create a new trails feature layer from its URL.FeatureLayer trailsLayer = new FeatureLayer(new ServiceFeatureTable(trailsURL));// Create a new open spaces feature layer from its URL.FeatureLayer openSpacesLayer = new FeatureLayer(new ServiceFeatureTable(parksOpenSpace));
// Add all feature layers to the map.map.getOperationalLayers().addAll(Arrays.asList(openSpacesLayer, trailsLayer, trailheadsLayer));Use API key access tokens
An API key access tokenApiKeyResource.
Tutorials
Samples
Feature layer (feature service)
Group layers
Scene layer
Manage operational layers