Get started

To start building applications, follow the steps below:

1. Sign in with an ArcGIS account

To access ArcGIS location services, you need an ArcGIS Developer account or ArcGIS Online account.

Get a free developer account

2. Get an API key

Create, manage, and scope API keys in your developer dashboard. Learn more in this tutorial.

Get an API key

3. Build a simple mapping app

Use your API key to access the basemap styles service and display a map.

This map contains the Navigation from the basemap styles service.

Steps

  1. Open the code in .

  2. Replace the apiKey with your API key from the developer dashboard .

    Expand
    Use dark colors for code blocks
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
        <script>
    
          const apiKey = "YOUR_API_KEY";
          const basemapEnum = "arcgis/navigation"; // Basemap layer style
    
          const map = new maplibregl.Map({
            container: "map", // ID of the div element
            style: `https://basemapstyles-api.arcgis.com/arcgis/rest/services/styles/v2/styles/${basemapEnum}?token=${apiKey}`,
            zoom: 1,
            center: [-20, 20] // Starting location [longitude, latitude]
          });
    
        </script>
    
    Expand
Go to full tutorial

4. Explore tutorials

Follow step-by-step tutorials to learn how to use MapLibre GL JS with other services.

See all tutorials

5. Deploy your application

Learn about general guidelines and the Terms of use before distributing your application.

Learn more

Next steps

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.