Introduction to visualization
You can style basemap layers, which are composed of vector tile data, and feature layers, which are composed of features, to help visualize the data in your application.
Basemap styles
A basemap style is a set of visual properties such as fill colors, viewing levels, and fonts that define how the visual elements in a vector tile basemap layer are displayed. There are two types of basemap styles: default and custom.
- Default styles: Styles provided by Esri such as
ArcGIS:
,Streets ArcGIS:
, andTopographic ArcGIS:
.Nova - Custom styles: Styles you create and save as items using the ArcGIS Vector Tile Style Editor.
How to display a custom basemap style
- Create a style with the ArcGIS Vector Tile Style Editor.
- Go to the new basemap layer's item page and copy its item ID.
- Reference the MapLibre JS and CSS libraries.
- Set the item ID as the basemap enumeration.
- Access the basemap layer.
Example
Display a custom basemap layer
To learn more, go to the Display a custom vector tile style tutorial.
Feature styles
A feature layer can be styled in MapLibre GL JS with a layer connected to a GeoJSON source. Layers can contain expressions which use attribute values to calculate values.
How to style a feature layer
- Define the data type (GeoJSON) and set the feature service URL.
- Add the layer to the map and define its
id
,type
,source
, andpaint
stylings.
Example
To learn more, go to the Style a feature layer tutorial.