Extends L.TileLayer.
L.esri. 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
| Constructor | Description |
|---|---|
L.esri. | 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. accepts all L.TileLayer options.
| Option | Type | Description |
|---|---|---|
token | String | An ArcGIS access token with permissions to access the static basemap tiles service. Required. |
language | String | Sets the language of the place labels on the map. Input must be a language code supported by the specified basemap style. |
worldview | String | Sets the worldview of the map. Currently only supports united. This provides access to the US edition of static basemap tiles. |
Default panes
L.esri. is added to Leaflet maps using the following panes by default. Panes specified using the pane option will override these values.
| Basemap type | Leaflet Pane | zIndex |
|---|---|---|
Label enumeration ending in /labels | esri-labels | 300 |
| Default (all other basemaps) | tile | 200 |
Methods
L.esri. inherits all methods from L.TileLayer.
Examples
Display a basemap style
This example loads the ArcGIS Outdoor basemap style.
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.
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 united worldview.
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);