Find answers and key resources for successfully building apps with MapLibre GL JS and ArcGIS.
General
This guide is for:
- New developers interested in building mapping applications using ArcGIS and MapLibre GL JS.
- ArcGIS developers who want to use an open-source library like MapLibre GL JS to display maps in web applications.
- Mapbox developers migrating to ArcGIS.
- MapLibre GL JS developers who want to integrate ArcGIS services in their applications.
Use MapLibre GL JS together with the MapLibre ArcGIS plugin to display ArcGIS basemap styles and access data.
To access other ArcGIS Location Services, such as the ArcGIS Geocoding, Routing, Places, Elevation, and GeoEnrichment services, use ArcGIS REST JS. You can display the results from the services in a MapLibre GL JS application.
The MapLibre ArcGIS plugin is an open source plugin for MapLibre GL JS to access ArcGIS services and build mapping applications. The plugin makes it easy to access the ArcGIS Basemap Styles service, add vector tile data, add feature data, and handle Esri and data attribution in a map.
ArcGIS REST JS is a light-weight collection of JavaScript modules for accessing ArcGIS services and building mapping and spatial analysis applications. The library makes it easy to set up authentication and to make requests to ArcGIS Location Services and ArcGIS Enterprise services.
Go to Open Source Mapping Libraries in Esri Community.
Please submit an issue or fork the GitHub repository and open a pull request with your suggested improvements.
Yes, Mapbox GL JS v1.x is still supported, but we recommend migrating to MapLibre GL JS. Development with Mapbox GL JS beyond version 1.x is not supported however.
ArcGIS services
ArcGIS services are software that support an ArcGIS REST API and provides geospatial functionality or data. ArcGIS provides many types of services, such as location services, data services and spatial analysis services.
The ArcGIS Basemap Styles service does not support 3D basemaps. Your options are:
- Get an ArcGIS Online subscription.
- Find an ArcGIS scene layer.
- Use ArcGIS Maps SDK for JavaScript or ArcGIS Maps SDKs for Native Apps to load the scene layers.
- If you are using ArcGIS Location Platform and want to display 3D basemaps, contact Esri.
The MapLibre ArcGIS plugin has built-in modules to access the following ArcGIS services:
- ArcGIS Basemap Styles service
- Vector tile services
- Feature services (via GeoJSON)
You can access the following services directly using the service URL in a MapLibre GL JS map:
- ArcGIS Static Basemap Tiles service
- Map tile services
You can access other services, such as the ArcGIS Geocoding service, ArcGIS Routing service, ArcGIS Places service, ArcGIS GeoEnrichment service, ArcGIS Elevation service, and spatial analysis service, using ArcGIS REST JS.
You need either an ArcGIS Location Platform account or ArcGIS Online account to access ArcGIS Location Services. This will give you the ability to access the portal, create developer credentials, and manage your data.
You can not use an ArcGIS Enterprise account to access ArcGIS Location Services.
The table below shows the account types you can use to access each service:
ArcGIS Location Services
To access ArcGIS services, you need an access token obtained from one of the following:
- API key authentication
- User authentication
- App authentication
ArcGIS Enterprise services
For services that are private, yes, you need to provide authentication to access ArcGIS Enterprise services. You typically implement OAuth 2.0 to do so. Public services do not require authentication.
To learn more about the different types of authentication, go to Security and authentication > Types of authentication.
To learn more about ArcGIS Location Services and their capabilities, go to the Mapping and location services guide.
To learn more about ArcGIS Enterprise services and capabilities, go to the ArcGIS Enterprise services REST API documentation.
Data services
Data services are services created dynamically to securely store, manage, and provide access to your data in portal. Some of the types of services that can be created are:
- Feature services
- Vector tile services
- Map tile services
- Image services
Data services are typically created by importing data with the data management tools. A unique URL for the service is assigned by the system when it is created.
The type of data service you use depends on the product you have, the format of your existing data, storage and output data format requirements, the size and complexity of the data, and the service functionality required.
Below is an overview of the main services and the data type each supports.
Data service | Data type | Data output | Use cases |
---|---|---|---|
Feature service | Feature (geometry and/or attributes) | JSON, PBF, GeoJSON | Display, visualization, editing, updating, accessing geometry, accessing attributes |
Vector tile service | Vector tile | PBF | Display, styling, accessing attributes |
Map tile service | Map tile | PNG32 | Display |
Image service | Static and dynamic tiles | JPEG, PNG, LERC | Display, visualization, anlaysis, mosaicking images |
Yes, Esri offers data hosting through ArcGIS Location Platform, ArcGIS Online and ArcGIS Enterprise (Portal for ArcGIS) that allow you to securely store, manage, and access your geographic data as hosted data services.
ArcGIS Location Platform and ArcGIS Online allow you to publish your data as hosted layers, which are hosted and managed by Esri's cloud infrastructure. This includes hosted feature layers, vector tile layers, and map tile layers.
With ArcGIS Enterprise, you can host data services in your own portal's infrastructure and managed database. This gives you more control but requires maintaining your own servers.
You can import and host many different types of geographic data as data services. The main requirement is that the incoming data has geometry coordinates and/or attributes (fields). The main storage formats are features, vector tiles, and map tiles. Some common file types include CSV, XLS, GeoJSON, Shapefile, and File Geodatabase files.
To learn more about supported data types, go to Portal and data services > Data services.
If your data services are feature services from GeoJSON or vector tile services, use the MapLibre ArcGIS plugin. The plugin has built-in classes to access the services and load the data into a MapLibre GL JS map.
For other types of data, you access the underlying data with an HTTP request to the service. The URL assigned to each service is unique and can be found in the item page for the service. Then, you load the data into a MapLibre GL JS map.
An access token is required for private data services.
No, your data is your data. You retain complete ownership of your content.
Service usage and billing
- ArcGIS Online: As an organization administrator, use the ArcGIS portal to generate reports on basemap usage.
- ArcGIS Location Platform: Use your ArcGIS Location Platform dashboard to view basemap session and tile usage. To learn more, see Basemap usage .
The cost to access ArcGIS Location Services depends on the type of ArcGIS account you have and the service operation you use.
-
If you have an ArcGIS Location Platform account, you are billed in US dollars. To determine the cost of accessing different services, go to Pricing. A free tier of access is available for some services.
-
If you have an ArcGIS Online account, you are billed in credits. To determine the cost of accessing different services, go to Understanding credits.
If you have ArcGIS Enterprise, there is no cost for accessing your own ArcGIS services. To learn more, go to ArcGIS Enterprise.
To find the Esri Terms of use, go to Terms of use.