L.esri.Static.staticBasemapTileLayer

Extends L.TileLayer.

L.esri.Static.staticBasemapTileLayer displays static basemap tiles from the static basemap tiles service (beta). It is included in the esri-leaflet-static-basemap-tile plugin. Basemaps from the static basemap tiles service (beta) are rendered as raster tiles that are returned as PNG files.

Constructor

ConstructorDescription
L.esri.Static.staticBasemapTileLayer(<String> style, <Object> options)style refers to a basemap style enumeration such as /beta/arcgis/streets.

Basemap style enumerations

Basemap style enumerations represent predefined basemap styles provided by ArcGIS. Set the style parameter to a valid style enumeration to load a basemap into your application.

Style enumerations from the Static basemap tiles service contain multiple parts separated by a forward slash (/). The general format is:

  • /beta/{provider}/{style-name}
  • /beta/{provider}/{style-name}/{component}

All styles must begin with /beta while the static basemap tiles service is still in beta. Some examples include:

  • /beta/arcgis/outdoor
  • /beta/arcgis/streets
  • /beta/arcgis/imagery/labels

Options

L.esri.Static.staticBasemapTileLayer accepts all L.TileLayer options.

OptionTypeDescription
tokenString

An ArcGIS access token with permissions to access the static basemap tiles service (beta). Required.

languageString

Sets the language of the place labels on the map. Input must be a language code supported by the specified basemap style.

Default panes

L.esri.Static.staticBasemapTileLayer is added to Leaflet maps using the following panes by default. Panes specified using the pane option will override these values.

Basemap typeLeaflet PanezIndex

Label enumeration ending in /labels

esri-labels300

Default (all other basemaps)

tilePane200

Methods

L.esri.Static.staticBasemapTileLayer inherits all methods from L.TileLayer.

Examples

Display a basemap style

This example loads the ArcGIS Outdoor basemap style.

Use dark colors for code blocksCopy
1
2
3
4
5
const map = L.map("map").setView([40.706, -73.926], 4);

L.esri.Static.staticBasemapTileLayer("/beta/arcgis/outdoor", {
token: "YOUR_ACCESS_TOKEN"
}).addTo(map);

Change the place label language

This example loads the ArcGIS Navigation basemap style with place labels in French.

Use dark colors for code blocksCopy
1
2
3
4
5
6
const map = L.map("map").setView([40.706, -73.926], 4);

L.esri.Static.staticBasemapTileLayer("/beta/arcgis/navigation", {
  token: "YOUR_ACCESS_TOKEN",
  language: "fr"
}).addTo(map);

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