L.esri.Static.staticBasemapTileLayer

Extends L.TileLayer.

L.esri.Static.staticBasemapTileLayer displays static basemap tiles from the static basemap tiles service. It is included in the esri-leaflet-static-basemap-tile plugin. Basemaps from the static basemap tiles service 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 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:

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

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. Required.

languageString

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

worldviewString

Sets the worldview of the map. Currently only supports unitedStatesOfAmerica. This provides access to the US edition of static basemap tiles.

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("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("arcgis/navigation", {
  token: "YOUR_ACCESS_TOKEN",
  language: "fr"
}).addTo(map);

Change the worldview

This example loads the ArcGIS Navigation basemap style with the unitedStatesOfAmerica worldview.

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

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

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