esri-leaflet 0,0,0,0,2,0 travis-ci Bower karma npm

A lightweight set of tools for working with ArcGIS services in Leaflet.

Esri Leaflet

npm version build status apache licensed

Leaflet plugins for working with a handful of the most popular ArcGIS Service types. This includes Esri basemaps and feature services, as well as tiled map, dynamic map and image services.

Esri Leaflet is maintained with :heart: by folks spanning multiple teams within Esri, but we provide no guarantee of individual features, nor a traditional product lifecycle to support planning.

The goal of this project is not to replace the ArcGIS API for JavaScript but rather to provide small components for only some aspects of the ArcGIS platform for developers who prefer to build mapping applications with Leaflet.

We are proud to facilitate a project which requires participation from our diverse user community in order to thrive and we welcome contributions from those just getting their feet wet in open-source.

Support for Geocoding services and Geoprocessing services, as well as service defined rendering are available as well (via additional plugins).

If you’d like to display Esri services in any Leaflet application, we ask that you adhere to our Terms of Use and attribution requirements.

Table of Contents


We’ve shared lots of sample code showing off many of the features of Esri Leaflet.


The easiest way to get started is to load Esri Leaflet via CDN. Here is an example you can copy/paste into your own .html file.


<!DOCTYPE html>
    <!-- Load Leaflet from CDN-->
    <link rel="stylesheet" href="[email protected]/dist/leaflet.css" />
    <script src="[email protected]/dist/leaflet-src.js"></script>

    <!-- Load Esri Leaflet locally, after cloning this repository -->
    <script src="[email protected]"></script>

      html, body, #map {
        margin:0; padding:0;  width : 100%; height : 100%;
    <div id="map"></div>
      var map ='map').setView([45.528, -122.680], 13);

      var parks = L.esri.featureLayer({
        url: "",
        style: function () {
          return { color: "#70ca49", weight: 2 };

      var popupTemplate = "<h3>{NAME}</h3>{ACRES} Acres<br><small>Property ID: {PROPERTYID}<small>";

        return L.Util.template(popupTemplate,

API Reference

A full API Reference can be found in the Esri Leaflet website.

The source code for the documentation site can be found in the repository below. If you notice a typo or other problem, please let us know!

Additional Plugins

Many folks have written plugins to customize and extend Leaflet.

You can also pick and choose additional Esri Leaflet plugins.

Frequently Asked Questions


If something isn’t working the way you expected, please take a look at previously logged issues that resolve common problems first. Have you found a new bug? Want to request a new feature? We’d love to hear from you. Please let us know by submitting an issue.

If you’re looking for help you can also post issues on GIS Stackexchange and/or the Esri Leaflet place on GeoNet.

Going Deeper

Development Instructions

If you’d like to inspect and modify the source of Esri Leaflet, follow the instructions below to set up a local development environment.

  1. Fork and clone Esri Leaflet
  2. cd into the esri-leaflet folder
  3. Install the package.json dependencies by running npm install
  4. Run npm start from the command line. This will compile minified source in a brand new dist directory, launch a tiny webserver and begin watching the raw source for changes.
  5. Run npm test to make sure you haven’t introduced a new ‘feature’ accidentally.
  6. Make your changes and create a pull request


  • Esri Leaflet 1.x (available on CDN) can be used in apps alongside:

  • Esri Leaflet 2.x (available on CDN) can be used in apps alongside:

The master branch of this repository is only compatible with Leaflet 1.0.x.


For transparency into the release cycle and in striving to maintain backward compatibility, Esri Leaflet is maintained under Semantic Versioning guidelines and will adhere to these rules whenever possible.

For more information on SemVer, please visit


Esri welcomes contributions from anyone and everyone. Please see our guidelines for contributing.


If you display an ArcGIS Online service in any Leaflet application, we require that you:

  1. Sign up for a free developer account.
  2. Display Esri attribution and recognize data providers.

Using this plugin, it couldn’t be easier to follow the terms. Just select your basemap and the appropriate credits will always be displayed in Leaflet’s own Attribution control as users pan/zoom automatically.



If you need more than 1 million map transactions per month, please let us know.



Copyright 2016 Esri

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

A copy of the license is available in the repository’s LICENSE file.

[](Esri Tags: ArcGIS Web Mapping Leaflet) [](Esri Language: JavaScript)

Related Repositories



A lightweight set of tools for working with ArcGIS services in Leaflet. ...



ESRI Plugin for Leaflet R Package ...



This plugin provides the ability to display and query ESRI REST services using the _export_ feature and the _identify_ feature. ...



Esri leaflet plugin for retrieving map service legends. ...



A plugin for Esri Leaflet that enables consuming Stream Services published by ArcGIS for Server. ...

Top Contributors

patrickarlt jgravois alaframboise paulcpederson tomwayson odoe robertd rdjurasaj-usgs oslek nikolaswise ungoldman aaronpk tyleralves kevinsigwart MandarinConLaBarba geographist scw brianbancroft hamhands qbit sidewalkballet mattficke whymarrh bmcbride nathanhilbert skarppion101 alexpatow alperdincer cwalv davidpiesse


package version
dev chai 3.5.0
gh-release ^2.0.0
highlight.js ^8.0.0
http-server ^0.8.5
husky ^0.12.0
isparta ^4.0.0
istanbul ^0.4.2
karma ^1.7.0
karma-chai-sinon ^0.1.3
karma-coverage ^1.1.1
karma-mocha ^1.3.0
karma-mocha-reporter ^2.2.1
karma-phantomjs-launcher ^0.2.0
karma-sourcemap-loader ^0.3.5
mkdirp ^0.5.1
mocha ^3.4.2
parallelshell ^2.0.0
phantomjs ^1.9.8
rollup ^0.25.4
rollup-plugin-json ^2.3.0
rollup-plugin-node-resolve ^1.4.0
rollup-plugin-uglify ^0.3.1
semistandard ^9.0.0
sinon ^1.11.1
sinon-chai 2.8.0
snazzy ^5.0.0
uglify-js ^2.8.29
watch ^0.17.1
arcgis-to-geojson-utils ^1.0.1
leaflet ~1.0.0
leaflet-virtual-grid ^1.0.3
tiny-binary-search ^1.0.2


-   v2.0.3 zip tar
-   v2.0.2 zip tar
-   v2.0.1 zip tar
-   v2.0.0 zip tar
-   v2.0.0-beta.8 zip tar
-   v2.0.0-beta.7 zip tar
-   v2.0.0-beta.6 zip tar
-   v2.0.0-beta.5 zip tar
-   v2.0.0-beta.4 zip tar
-   v2.0.0-beta.3 zip tar
-   v2.0.0-beta.2 zip tar
-   v2.0.0-beta.1 zip tar
-   v1.0.4 zip tar
-   v1.0.3 zip tar
-   v1.0.2 zip tar
-   v1.0.1 zip tar
-   v1.0.0 zip tar
-   v1.0.0-rc.8 zip tar
-   v1.0.0-rc.7 zip tar
-   v1.0.0-rc.6 zip tar
-   v1.0.0-rc.5 zip tar
-   v1.0.0-rc.4 zip tar
-   v1.0.0-rc.3 zip tar
-   v1.0.0-rc.2 zip tar
-   v1.0.0-rc.1 zip tar
-   v0.0.1-rc.2 zip tar
-   v0.0.1-rc1 zip tar
-   v0.0.1-beta.6 zip tar
-   v0.0.1-beta.5 zip tar
-   v0.0.1-beta.4 zip tar