Introduction to basemap layers
A map is a container for layers. You use a map together with a map view to display layers of geographic data in 2D. Most applications contain a basemap layer to display geographic data with streets or satellite imagery, and the data is typically provided by the basemap styles service.
You can use the basemap styles service in your application to:
- Display different types of geographic data of the world for a map.
- Display default vector tile basemap styles such as streets navigation, light gray canvas, and OSM.
- Display custom basemap styles with your own colors, glyphs, and fonts.
- Display default image tile (raster) basemap layers for satellite imagery and hillshade.
How to access the basemap styles service
To access vector basemap layers, you reference both the main Esri Leaflet plugin and the vector
plugin.
- Reference the Esri Leaflet and vector plugins.
- Define a basemap style enumeration.
- Instantiate the
vector
class.Basemap Layer - Set the basemap enumeration and API key.
Example
Display a basemap layer
This example loads and displays the ArcGIS:
vector tile style in the map. To see all of the basemap style enumerations, go to Basemap styles service in the Mapping APIs and location services guide.
To learn more, see the Display a map and Change the basemap layer tutorials.