Extends L.TileLayer.
L.esri.
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
Constructor | Description |
---|---|
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.
accepts all L.TileLayer options.
Option | Type | Description |
---|---|---|
token | String | An ArcGIS access token with permissions to access the static basemap tiles service (beta). 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. |
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 | esri-labels | 300 |
Default (all other basemaps) | tilePane | 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("/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.
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);