There are two common roles for layers:
- Basemap layers - provide context (a background) for your data
- Operational layers - the map data actively in use
For example, a map of a utility network might show pipes in an operational layer and a street map background (basemap) to make it clear which houses those pipes serve.
If you want to quickly visualize data that's available to your app, but don't want to store it in an ArcGIS portal or a layer, consider using graphics.
Maps and scenes expose an operational layers property, which is a collection of layers. You can add and remove layers from the map's operational layers.
Map map = new Map();
Basemaps exposes a 'base layers' property, which contains all of the layers in the basemap. The BaseLayers property can be accessed through the basemap property on maps and scenes. Note that using a basemap for all your maps is recommended, when a suitable one is available. Some examples of basemaps that can be created using static factory methods are:
- World imagery
- World streets
- National geographic
- World navigation (vector)
- World streets (vector)
// Use the navigation basemap static method
Map map = new Map(Basemap.CreateNavigationVector());
map.Basemap = Basemap.CreateNavigationVector();