L.esri.BasemapLayer (Deprecated)
Extends L.TileLayer
L.esri.basemapLayer
is used to display classic raster tiled Esri hosted basemaps and attributes data providers appropriately. The Terms of Use for Esri hosted services apply to all Leaflet applications.
DEPRECIATION NOTICE: This class references the old ArcGIS tiled basemap services that are no longer updated and could be deactivated without notice. Please update your application to use the Vector Basemap Layer Plugin that references the new ArcGIS Platform basemap layer service. To do so, you will need an ArcGIS account and an API key. See the following example.
Constructor
Constructor | Description |
---|---|
L.esri.basemapLayer(<String> |
key refers to the specific basemap you'd like to add. The options parameter can accept the same options as L.TileLayer . |
Basemaps
These maps have worldwide coverage at a variety of zoom levels.
Streets
Topographic
NationalGeographic
Oceans
Gray
DarkGray
Imagery
ImageryClarity
(added in 2.1.3)ImageryFirefly
(added in 2.2.0)ShadedRelief
Terrain
USATopo
(added in 2.0.0)Physical
(added in 2.2.0)
Optional Labels
These are optional layers that add extra text labels to the basemaps.
OceansLabels
- Labels to pair with theOceans
basemapGrayLabels
- Labels to pair with theGray
basemapDarkGrayLabels
- Labels to pair with theDarkGray
basemapImageryLabels
- Labels including political boundaries to pair with anyImagery
basemapImageryTransportation
- Street map labels for pairing with anyImagery
basemapShadedReliefLabels
- Labels for pairing with theShadedRelief
basemapTerrainLabels
- Labels for pairing with theTerrain
orPhysical
basemap
Options
L.esri.basemapLayer
also accepts all L.TileLayer
options.
Option | Type | Default | Description |
---|---|---|---|
token |
String |
null |
Will use this token to authenticate all calls to the service. |
ignoreDeprecationWarning |
boolean |
null |
When true , will not show the deprecation warning in the developer console. |
Methods
L.esri.BasemapLayer
inherits all methods from L.TileLayer
.
Events
L.esri.TiledMapLayer
fires all L.TileLayer
events.
Example
var map = L.map('map').setView([37.75, -122.45], 12);
L.esri.basemapLayer('Topographic').addTo(map);