Skip to content

Package

esri-leaflet-cluster

Current version: 3.0.1

This plugin extends L.FeatureLayer with support for client-side clustering of point features using Leaflet.markercluster.

Install

Below are instructions to install Esri Leaflet Cluster and its dependencies. You can install it via NPM for use in CommonJS environments or include it directly in your HTML using CDN links.

NPM

You can install the plugin as a Common JS module via NPM:

Use dark colors for code blocksCopy
1
2
3
4
npm install leaflet --save
npm install esri-leaflet --save
npm install leaflet.markercluster --save
npm install esri-leaflet-cluster --save

CDN

You can also include esri-leaflet-cluster using script tags in your HTML.

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<!-- Leaflet -->
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"/>
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script>

<!-- Esri Leaflet -->
<script src="https://unpkg.com/esri-leaflet@3.0.19/dist/esri-leaflet.js"></script>

<!-- Leaflet Marker Cluster -->
<link rel="stylesheet" href="https://unpkg.com/leaflet.markercluster@1.5.3/dist/MarkerCluster.Default.css"/>
<link rel="stylesheet" href="https://unpkg.com/leaflet.markercluster@1.5.3/dist/MarkerCluster.css""/>
<script src="https://unpkg.com/leaflet.markercluster@1.5.3/dist/leaflet.markercluster.js"></script>

<!-- Esri Leaflet Cluster -->
<script src="https://unpkg.com/esri-leaflet-cluster@3.0.1/dist/esri-leaflet-cluster.js"></script>

Classes

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.