Jonah Adkins

Cartography, OpenStreetMap, Open Data, Music, Disney, Sports Cards, Pro-Wrestling, and Ink.

Esri Leaflet Marker Cluster Example

14 Jun 2017 » cartography, esri, leaflet


Check out Alternative Fueling Stations.


This quick demo shows how to cluster points using the markercluster plugin for Esri Leaflet. Building off of the great styling clusters example, this demo uses a feature layer of US Alternative Fueling Stations from the HIFLD Open Data.

The clusters are sized & styled by the number of digits (1 thru 4) in the count of points assigned to each cluster, and then the layer is called using L.esri.Cluster.featureLayer as shown below:

    url: '',
    spiderfyOnMaxZoom: false,
    disableClusteringAtZoom: 16,
    polygonOptions: {
        color: '#355C7D',
        weight: 2,
        opacity: 1,
        fillOpacity: 0.5

Full code for this sample available here