Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

esri-leaflet

Package Overview
Dependencies
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

esri-leaflet

Leaflet plugins for consuming ArcGIS Online and ArcGIS Server services.

  • 2.0.0-beta.8
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
44K
increased by3.37%
Maintainers
1
Weekly downloads
 
Created
Source

Esri Leaflet

Build Status

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

Demos

We've written loads of demos showing many of the features of Esri Leaflet.

Example

Here is a quick example to get you started. Just copy/paste into your own .html file and run.

App

<!DOCTYPE html>
<html>
  <head>
     <!-- Load Leaflet from CDN-->
    <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet/v1.0.0-beta.2/leaflet.css" />
    <script src="http://cdn.leafletjs.com/leaflet/v1.0.0-beta.2/leaflet.js"></script>

    <!-- Load Esri Leaflet locally, after cloning this repository -->
    <script src="http://cdn.jsdelivr.net/leaflet.esri/2.0.0-beta.7/esri-leaflet.js"></script>

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

      L.esri.basemapLayer("Gray").addTo(map);

      var parks = L.esri.featureLayer({
        url: "http://services.arcgis.com/rOo16HdIMeOBI4Mb/arcgis/rest/services/Portland_Parks/FeatureServer/0",
        style: function () {
          return { color: "#70ca49", weight: 2 };
        }
      }).addTo(map);

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

      parks.bindPopup(function(e){
        return L.Util.template(popupTemplate, e.feature.properties)
      });
    </script>
  </body>
</html>

Documentation & Examples

A full API Reference and plenty of sample code can be found at the Esri Leaflet website. The source code for the site can be found here.

Issues

Find a bug or want to request a new feature? Please let us know by submitting an issue.

Please take a look at previously logged issues that resolve common problems.

You can also post issues on GIS Stackexchange and/or the Esri Leaflet place on GeoNet.

Did you notice a problem with the Esri Leaflet website? Please let us know!

Frequently Asked Questions

Projects Using Esri Leaflet

Feel free to add your own project to this list!

Development Instructions

  1. Fork and clone Esri Leaflet
  2. cd into the esri-leaflet folder
  3. Install the dependencies with 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' accidently.
  6. Make your changes and create a pull request
  7. If you're interested in playing around with our website locally, just make sure you have GruntCLI installed and run grunt. This will start the web server locally at http://localhost:8001 and start watching the website source files for changes.

Dependencies

  • 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.

Versioning

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

Releases will be numbered with the following format:

<major>.<minor>.<patch>

And constructed with the following guidelines:

  • Breaking backward compatibility bumps the major while resetting minor and patch
  • New additions without breaking backward compatibility bumps the minor while resetting the patch
  • Bug fixes and misc changes bumps only the patch

For more information on SemVer, please visit http://semver.org/.

Contributing

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

Credit

Licensing

Copyright 2015 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

http://www.apache.org/licenses/LICENSE-2.0

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)

Keywords

FAQs

Package last updated on 29 Feb 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc