Open source developers: Time to upgrade to the new ArcGIS basemap layer service!

If you have built a mapping application with an open source client API such as Leaflet, Esri Leaflet, Openlayers, or Mapbox, that uses the legacy ArcGIS Online tile services, then it’s time to update to the new ArcGIS basemap layer service!
The legacy ArcGIS Online tile services are in mature status and are no longer being updated. So to ensure uninterrupted access and to comply with Esri’s Terms of Use, applications need to be updated before April 30, 2022.
The good news is that updating is easy and you can still access basemap services for free!

The new ArcGIS basemap layer service

The new ArcGIS basemap layer service replaces the legacy ArcGIS Online tile services. The new service provides much better performance, especially for applications accessed from different countries around the world, and it also provides higher resolution satellite imagery for new geographic regions.
We also encourage you to use the new vector tile basemap service. The service supports the Mapbox Vector Tile Specification and is easy to integrate with open source APIs. Vector tiles provide the best overall performance and you can choose from over 25 vector tile styles for your applications.
The vector tile service also supports creating your own basemap styles with the Vector Tile Style Editor, so you can brand your applications with custom colors, fonts, and glyphs. Learn how to create custom styles in the Create a custom style tutorial.

Steps to update your applications

Follow these steps to replace the legacy services with the new basemap service:

1. Identify the legacy basemap services

If your application uses any of the URL endpoints below, then you need to update your application.

2. Get an ArcGIS account

To use the new basemap layer service, you need an ArcGIS Developer (for individual developers) or ArcGIS Online account (for organizations). If you don’t have one, you can sign up for free.
NOTE: A developer account gives you access to 2,000,000 basemap tiles for free per month.

3. Get an API key

Log in to the developer dashboard and get an API key (access token).

4. Reference the new services

Use your API key to access the new basemap layer service. Use the URL endpoints below or go to the specific code examples for Leaflet, Mapbox, and OpenLayers.

Image tiles

To access the new image tiles directly for satellite imagery, ocean, or hillshade, use the URL below with {z},{y},and {x} values and a token.{ImageryType}/MapServer/tile/{z}/{y}/{x}?token={ACCESS_TOKEN}


Vector tiles

To access the new vector tile styles, use the URL below with the basemapStyle, type, and token (either an API key or OAuth 2.0 token). The type should be set to style.{basemapStyle}?type={type}&token={ACCESS_TOKEN}


How to update Leaflet and Esri Leaflet apps

The easiest way to update Leaflet applications is to use the Esri Leaflet plugin. You need to load the Esri Leaflet CDN or npm package as well as the Esri Leaflet Vector Plugin.

NOTE: If you already use the Esri Leaflet API with the L.Esri.BasemapLayer class, you need to use the L.esri.Vector.vectorBasemapLayer plugin since the L.Esri.BasemapLayer class is deprecated.

After the libraries are loaded, you can use your API key to access all of the basemap layer styles available.

Learn more in the Esri Leaflet and location services developer guide.


<script src=""integrity="sha512-kuYkbOFCV/SsxrpmaCRMEFmqU08n6vc+TfAVlIKjR1BPVgt75pmtU9nbQll+4M9PN2tmZSAgD1kGUCKL88CscA=="crossorigin=""></script>
<script src=""integrity="sha512-7rLAors9em7cR3/583gZSvu1mxwPBUjWjdFJ000pc4Wpu+fq84lXF1l4dbG4ShiPQ4pSBUTb4e9xaO6xtMZIlA=="crossorigin=""></script>

const apiKey = "YOUR_API_KEY";
const basemapEnum = "ArcGIS:Navigation";
const map ='map', {
  minZoom: 2
}).setView([25,-10], 2); //Latitude, longitude
L.esri.Vector.vectorBasemapLayer(basemapEnum, {
  apiKey: apiKey

How to update Mapbox GL JS apps

If you are using an earlier version of Mapbox GL JS (version 1.x), you can access new ArcGIS basemap layer service directly. Replace the old URL endpoints with the new vector tile layer endpoints and include your API key.

Learn more in the  Mapbox GL JS and ArcGIS location services guide.


<script src=""></script>
<link href="" rel="stylesheet"/>

const apiKey = "YOUR_API_KEY";
const basemapEnum = "ArcGIS:Nova";  // Basemap layer style
const map = new mapboxgl.Map({
  container: "map", 
  style: "" + basemapEnum+ "?type=style&token=" + apiKey;",
  zoom: 1,
  center: [-5, 30] // [longitude, latitude]

How to update OpenLayers apps

If you are using the OpenLayers API with the TileLayer class or another plug-in such as the OL-Mapbox-Style library, then update to the new URL endpoints to use your API key.

Learn more in the OpenLayers and ArcGIS location services guide.


<link rel="stylesheet" href="" type="text/css" />
<script src=""></script>
<script src=""></script>

const apiKey = "YOUR_API_KEY";
const basemapId = "ArcGIS:Topographic";
const basemapURL = "" + basemapId + "?type=style&token=" + apiKey;
olms(map, basemapURL); //OpenLayers Mapbox style


The legacy ArcGIS Online tile services have been in mature status for some time now, so to ensure uninterrupted service access, and to comply with Esri’s Terms of Use, you need to update to the new ArcGIS basemap layer service before April 30, 2022.

Also, if you are interested in using other ArcGIS location services such as geocoding or routing with open source APIs, visit the Mapping APIs and location service guide.

Please let us know if you have any questions or concerns.

About the authors

Allan Laframboise is the product engineering lead for documentation for the Developer Experience team.

Anita Kemp is a product engineer on the Developer Experience team.

Notify of
Inline Feedbacks
View all comments

Next Article

Generative AI in Urban Planning

Read this article