L.esri.BasemapLayer

L.esri.basemapLayer is used to display Esri hosted basemaps and attributes data providers appropriately. The Terms of Use for Esri hosted services apply to all Leaflet applications.

Inherits from L.TileLayer

Constructor

Constructor Description
L.esri.basemapLayer(<String> key, <Object> options) 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
  • ShadedRelief
  • Terrain
  • USATopo (added in 2.0.0)
Optional Labels

These are optional layers that add extra text labels to the basemaps.

  • OceansLabels - Labels to pair with the Oceans basemap
  • GrayLabels - Labels to pair with the Gray basemap
  • DarkGrayLabels - Labels to pair with the DarkGray basemap
  • ImageryLabels - Labels including political boundaries to pair with the Imagery basemap
  • ImageryTransportation - Street map labels for pairing with the Imagery basemap
  • ShadedReliefLabels - Labels for pairing with the ShadedRelief base map
  • TerrainLabels - Labels for pairing with the Terrain base map

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.

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);

Edit this page on GitHub