Learn how to create a custom basemap style
A basemap style
In this tutorial, use ArcGIS Vector Tile Style Editor
Prerequisites
You need an ArcGIS Location Platform or ArcGIS Online account.
Steps
Create a custom basemap style
You can create your own custom basemap with the ArcGIS Vector Tile Style Editor
-
Go to the Vector Tile Style Editor.
-
Sign in with your ArcGIS account.
-
Click + New style.
-
In the Select a style to continue panel, click Popular > Light Gray Canvas.
-
In left-panel, click Quick Edit. Style the basemap using Colors, Font, Label Size, and Road Width. For example:
- Colors
- Land:
#cbe8b0 - Water:
#b9dbf7 - Roads:
#f0f1f0 - Boundaries:
#ffffff - Buildings:
#ebe7dc - Nature:
#f0fae6
- Land:
- Colors
-
In the search tool of the map, enter
Yosemite National Park. -
Click on any green area to open the Admin0 forest or park layer.
-
In the map, zoom out to level 6 so that the layer disappears.
-
In the Layer Editor > Visibility panel, set the first number of the Visible Zoom Range to 3 to make the layer visible.
-
In the Layer Editor > Appearance panel, set the fill and outline color properties to change at different zoom levels using either hex codes or the color selector. For example:
- Color > Settings icon > Set Value by Zoom level:
3#ddf0ca6#cbe5b1- Click Add Stop and enter:
10#bae291.
- Outline Color:
#bbd4a2 - Opacity:
60%
- Color > Settings icon > Set Value by Zoom level:
-
In the toolbar, click Save As to save your customized basemap. Enter a Title and Tags.
Get the starter app
Select a type of authentication and follow the steps to create a new app.
Choose API key authentication if you:
- Want the easiest way to get started.
- Want to build public applications
A public application is an application that allows anonymous access without requiring users to sign in with an ArcGIS account. It supports API key or app authentication. that access ArcGIS Location ServicesArcGIS Location Services, also referred to as Location Services, are services hosted by Esri that provide geospatial functionality for developing mapping applications. They include the ArcGIS Basemap Styles service, ArcGIS Static Basemap Tiles service, ArcGIS Places service, ArcGIS Geocoding service, ArcGIS Routing service, ArcGIS GeoEnrichment service, and ArcGIS Elevation service. An ArcGIS Location Platform or ArcGIS Online account is required to use the services. and secure itemsAn item, also known as a content item, is a resource stored in a portal such as a web map, hosted layer, style, script tool, file, or notebook. . - Have an ArcGIS Location Platform or ArcGIS Online account.
Choose user authentication if you:
- Want to build private applications.
- Require application users to sign in with their own ArcGIS account
An ArcGIS account is an identity with a user type and set of privileges that can access specific ArcGIS products, tools, APIs, services, and resources. The main account types that can be used for development are an ArcGIS Location Platform account, ArcGIS Online account, and ArcGIS Enterprise account. ArcGIS Location Platform and ArcGIS Online accounts are also associated with a subscription. and access resources their behalf. - Have an ArcGIS Online account.
To learn more about both types of authentication, go to Authentication.
Set up authentication
Set developer credentials
Use the API key or OAuth developer credentials
Display the custom basemap style
Use the MapLibre ArcGIS plugin to access the custom basemap style by referencing its item ID
-
Go to the item page
An item page is a web page in ArcGIS Online or the developer dashboard used to access and manage the properties for an item and the content it references such as a web map, hosted layer, or file. of the custom basemap style that you previously created and find its item IDAn item, also known as a content item, is a resource stored in a portal such as a web map, hosted layer, style, script tool, file, or notebook. . The ID is at the end of the URL, for example9d94a890b76a417cad8a748df4f97336. -
Reference the item ID in your
Basemapobject.Style Use dark colors for code blocks Copy const basemapStyle = maplibreArcGIS.BasemapStyle.applyStyle(map, { style: "9d94a890b76a417cad8a748df4f97336", token: accessToken });
Run the app
Run the app.
The map should display the custom basemap style created using ArcGIS Vector Tile Style Editor.What's next?
Learn how to use additional location services in these tutorials:


