Use the ArcGIS Static Basemap Tiles service to display Open Basemap styles with ArcGIS Maps SDKs and open source libraries.
Open Basemap Styles
The Static Basemap Tiles service supports styles in the Open Basemap style family. The styles reference data from Esri, the Overture Maps Foundation, and other authoritative data provides such as
OpenStreetMap (OSM), Microsoft, Esri Community Maps, and other open data sources.
.The styles are categorized into the following groups:
- Streets: Road networks, urban, and community features e.g.
open/streets
andopen/osm-style
- Satellite: Satellite imagery and labels e.g.
open/hybrid/detail
- Reference: Minimal geographic features such as boundaries and place labels e.g.
open/light-gray
andopen/dark-gray
See all the styles below.
How to display an Open Basemap style
The general steps to display a basemap style are:
- Set the service URL, path and query parameters:
- Service URL
https
.://static-map-tiles-api.arcgis.com/arcgis/rest/services/static-basemap-tiles-service/v1/{style _family}/{style _name}/static/tile/{z}/{y}/{x}?{parameters}&token= <ACCESS _TOKEN >
- Path parameters
- Style family:
open
- Style name: For example
open/osm-style
oropen/light-gray
. See all names below.
- Style family:
- Query parameters
- Style preferences: Not available
- Access token:
token
- Service URL
- Set the access token either as an authorization header or query parameter.
- Display the style with a client API. See the Code examples.
- Display Esri and data attribution.
To learn more about the service parameters, access tokens, and attribution requirements, go to the Introduction to the ArcGIS Static Basemap Tiles service.
Styles
Code examples
Get all style names
This example shows how to use the ArcGIS Static Basemap Tiles service /self
request to return all available styles in the Open Basemap style family.
const selfCallURL = "https://static-map-tiles-api.arcgis.com/arcgis/rest/services/static-basemap-tiles-service/v1/self";
fetch(selfCallURL, {
method: "GET",
headers: {"Authorization": `Bearer ${YOUR_ACCESS_TOKEN}`},
})
.then((response) => response.json())
.then((result) => {
const openStyles = result.styles.filter(style=>style.styleFamily === 'open');
console.log(openStyles)}
)
.catch((error) => console.error(error));
Display an Open Basemap style
This example shows how to use the service as a data source for a basemap. To see all of the styles, go to the styles table.
//const basemapStyle = "open/osm-style"
const basemapStyle = "open/navigation";
// const basemapStyle = "open/navigation-dark"
// const basemapStyle = "open/streets"
// const basemapStyle = "open/light-gray"
// const basemapStyle = "open/dark-gray"
// const basemapStyle = "open/hybrid/detail"
const basemap = new Basemap({
baseLayers: [
new TileLayer({
url: `https://static-map-tiles-api.arcgis.com/arcgis/rest/services/static-basemap-tiles-service/v1/${basemapStyle}/static`,
}),
],
});
const map = new Map({
basemap: basemap,
});
const view = new MapView({
container: "viewDiv",
map: map,
center: [-43.4227, -22.8283], // Brazil (x, y)
zoom: 9,
});