Use the ArcGIS Basemap Styles service to display Open Basemap styles with ArcGIS SDKs and open source libraries.
Open Basemap styles
The Basemap Styles service supports styles in the Open Basemap style family. The styles reference data from Overture Maps and open source data providers 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, open/osm-style/ open/navigation
- Satellite: Satellite imagery and labels e.g. open/hybrid
- Reference: Minimal geographic features such as boundaries and place labels e.g. open/light-gray, open/dark-gray
- Creative: Alternative cartographic designs e.g. arcgis/blueprint
See all of the styles below.
How to display an Open Basemaps style
The general steps to display an basemap style are:
- Set the service URL, path and query parameters:
- Service URL
https
.://basemapstyles-api.arcgis.com/arcgis/rest/services/styles/v2/{style _response}/{style _family}/{style _name}?{parameters}&token= <ACCESS _TOKEN >
- Path parameters
- Style response:
styles
orwebmaps
- Style family:
open
- Style name: For example
osm-style
,hybrid
, andnavigation
. See all names below.
- Style response:
- Query parameters
- Style preferences: Not supported.
- Access token:
token
- Service URL
- Set the access token either as 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 Basemap Styles service.
Styles
OSM styles to Open styles
If your existing application uses a deprecated OSM style, use the table below to update the equivalent Open style.
OSM style (deprecated) | Open styles |
---|---|
OSM Blueprint | Open Basemaps Blueprint |
OSM Hybrid | Open Basemaps Hybrid |
OSM Hybrid Detail | Open Basemaps Hybrid Detail |
OSM Navigation | Open Basemaps Navigation |
OSM Navigation Dark | Open Basemaps Navigation Dark |
OSM Standard | Open Basemaps OpenStreetMap Style |
OSM Standard Relief | Open Basemaps OpenStreetMap Style Relief |
OSM Standard Relief Base | Open Basemaps OpenStreetMap Style Relief Base |
OSM Streets | Open Basemaps Streets |
OSM Streets Relief | Open Basemaps Streets Relief |
OSM Streets Relief Base | Open Basemaps Streets Relief Base |
OSM Light Gray | Open Basemaps Light Gray |
OSM Light Gray Base | Open Basemaps Light Gray Base |
OSM Light Gray Labels | Open Basemaps Light Gray Labels |
OSM Dark Gray | Open Basemaps Dark Gray |
OSM Dark Gray Base | Open Basemaps Dark Gray Base |
OSM Dark Gray Labels | Open Basemaps Dark Gray Labels |
Code examples
Get all style names
This example shows how to use the ArcGIS Basemap Styles service /self
request to return all available styles. The styles are filtered by provider === "open"
to get the styles in the ArcGIS Open style family.
import { request } from '@esri/arcgis-rest-request';
const selfCallURL = "https://basemapstyles-api.arcgis.com/arcgis/rest/services/styles/v2/styles/self";
request(selfCallURL, {httpMethod: "GET"})
.then(results => {
const openStyles = results.styles.filter(style.provider === 'open');
console.log(openStyles);
});
Display an Open Basemaps style
This example shows how to use the service as a data source for a basemap using the OpenStreetMap style from the Open Basemaps style family. To see all of the styles, go to the style table above.
const openStyle = new Basemap({
style: new BasemapStyle({
id: "open/osm-style"
})
});
const map = new Map({
basemap: openStyle,
constraints: {
snapToZoom: false,
},
});