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

esri-leaflet-cluster

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

esri-leaflet-cluster - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

cluster-example.jpg

8

bower.json
{
"name": "esri-leaflet-clustered-feature-layer",
"main": "dist/esri-leaflet-clustered-feature-layer.js",
"name": "esri-leaflet-cluster",
"main": "dist/esri-leaflet-cluster.js",
"dependencies": {
"esri-leaflet": "^2.0.0",
"leaflet": "^1.0.0-rc.3",
"leaflet.markercluster": "git+https://github.com/Leaflet/Leaflet.markercluster.git#v1.0.0-rc.1"
"leaflet": "^1.0.0",
"leaflet.markercluster": "^1.0.0"
},

@@ -9,0 +9,0 @@ "ignore": [

@@ -5,2 +5,8 @@ # Changelog

## [2.0.1]
### Changed
* Updated dependencies ([#20](https://github.com/Esri/esri-leaflet-cluster/pull/20))
## [2.0.0]

@@ -76,2 +82,3 @@

[unreleased]: https://github.com/Esri/esri-leaflet-clustered-feature-layer/compare/v2.0.0...HEAD
[2.0.1]: https://github.com/Esri/esri-leaflet-clustered-feature-layer/compare/v2.0.0...v2.0.1
[2.0.0]: https://github.com/Esri/esri-leaflet-clustered-feature-layer/compare/v2.0.0-beta.1...v2.0.0

@@ -78,0 +85,0 @@ [2.0.0-beta.1]: https://github.com/Esri/esri-leaflet-clustered-feature-layer/compare/v1.0.2...v2.0.0-beta.1

@@ -1,3 +0,3 @@

/* esri-leaflet-cluster - v2.0.0 - Thu Aug 18 2016 17:12:43 GMT-0700 (PDT)
* Copyright (c) 2016 Environmental Systems Research Institute, Inc.
/* esri-leaflet-cluster - v2.0.1 - Thu Sep 26 2019 15:47:35 GMT-0500 (Central Daylight Time)
* Copyright (c) 2019 Environmental Systems Research Institute, Inc.
* Apache-2.0 */

@@ -7,180 +7,181 @@ (function (global, factory) {

typeof define === 'function' && define.amd ? define(['exports', 'leaflet', 'esri-leaflet'], factory) :
(factory((global.L = global.L || {}, global.L.esri = global.L.esri || {}, global.L.esri.Cluster = global.L.esri.Cluster || {}),global.L,global.L.esri));
}(this, function (exports,L,esriLeaflet) { 'use strict';
(factory((global.L = global.L || {}, global.L.esri = global.L.esri || {}, global.L.esri.Cluster = {}),global.L,global.L.esri));
}(this, (function (exports,L,esriLeaflet) { 'use strict';
L = 'default' in L ? L['default'] : L;
L = L && L.hasOwnProperty('default') ? L['default'] : L;
var version = "2.0.0";
var version = "2.0.1";
var FeatureLayer = esriLeaflet.FeatureManager.extend({
var FeatureLayer = esriLeaflet.FeatureManager.extend({
statics: {
EVENTS: 'click dblclick mouseover mouseout mousemove contextmenu popupopen popupclose',
CLUSTEREVENTS: 'clusterclick clusterdblclick clustermouseover clustermouseout clustermousemove clustercontextmenu'
},
statics: {
EVENTS: 'click dblclick mouseover mouseout mousemove contextmenu popupopen popupclose',
CLUSTEREVENTS: 'clusterclick clusterdblclick clustermouseover clustermouseout clustermousemove clustercontextmenu'
},
/**
* Constructor
*/
/**
* Constructor
*/
initialize: function (options) {
esriLeaflet.FeatureManager.prototype.initialize.call(this, options);
initialize: function (options) {
esriLeaflet.FeatureManager.prototype.initialize.call(this, options);
options = L.setOptions(this, options);
options = L.setOptions(this, options);
this._layers = {};
this._leafletIds = {};
this._layers = {};
this._leafletIds = {};
this.cluster = L.markerClusterGroup(options);
this._key = 'c' + (Math.random() * 1e9).toString(36).replace('.', '_');
this.cluster = L.markerClusterGroup(options);
this._key = 'c' + (Math.random() * 1e9).toString(36).replace('.', '_');
this.cluster.addEventParent(this);
},
this.cluster.addEventParent(this);
},
/**
* Layer Interface
*/
/**
* Layer Interface
*/
onAdd: function (map) {
esriLeaflet.FeatureManager.prototype.onAdd.call(this, map);
this._map.addLayer(this.cluster);
},
onAdd: function (map) {
esriLeaflet.FeatureManager.prototype.onAdd.call(this, map);
this._map.addLayer(this.cluster);
},
onRemove: function (map) {
esriLeaflet.FeatureManager.prototype.onRemove.call(this, map);
this._map.removeLayer(this.cluster);
},
onRemove: function (map) {
esriLeaflet.FeatureManager.prototype.onRemove.call(this, map);
this._map.removeLayer(this.cluster);
},
/**
* Feature Management Methods
*/
/**
* Feature Management Methods
*/
createLayers: function (features) {
var markers = [];
createLayers: function (features) {
var markers = [];
for (var i = features.length - 1; i >= 0; i--) {
var geojson = features[i];
var layer = this._layers[geojson.id];
for (var i = features.length - 1; i >= 0; i--) {
var geojson = features[i];
var layer = this._layers[geojson.id];
if (!layer) {
var newLayer = L.GeoJSON.geometryToLayer(geojson, this.options);
newLayer.feature = L.GeoJSON.asFeature(geojson);
newLayer.defaultOptions = newLayer.options;
newLayer._leaflet_id = this._key + '_' + geojson.id;
if (!layer) {
layer = L.GeoJSON.geometryToLayer(geojson, this.options);
layer.feature = L.GeoJSON.asFeature(geojson);
layer.defaultOptions = layer.options;
layer._leaflet_id = this._key + '_' + geojson.id;
this.resetStyle(newLayer.feature.id);
this.resetStyle(layer.feature.id);
// cache the layer
this._layers[newLayer.feature.id] = newLayer;
// cache the layer
this._layers[layer.feature.id] = layer;
this._leafletIds[newLayer._leaflet_id] = geojson.id;
this._leafletIds[layer._leaflet_id] = geojson.id;
if (this.options.onEachFeature) {
this.options.onEachFeature(newLayer.feature, newLayer);
}
if (this.options.onEachFeature) {
this.options.onEachFeature(layer.feature, layer);
}
this.fire('createfeature', {
feature: newLayer.feature
});
this.fire('createfeature', {
feature: layer.feature
});
}
// add the layer if it is within the time bounds or our layer is not time enabled
if (!this.options.timeField || (this.options.timeField && this._featureWithinTimeRange(geojson))) {
markers.push(newLayer);
}
}
}
// add the layer if it is within the time bounds or our layer is not time enabled
if (!this.options.timeField || (this.options.timeField && this._featureWithinTimeRange(geojson))) {
markers.push(layer);
}
}
if (markers.length) {
this.cluster.addLayers(markers);
}
},
if (markers.length) {
this.cluster.addLayers(markers);
}
},
addLayers: function (ids) {
var layersToAdd = [];
for (var i = ids.length - 1; i >= 0; i--) {
var layer = this._layers[ids[i]];
this.fire('addfeature', {
feature: layer.feature
});
layersToAdd.push(layer);
}
this.cluster.addLayers(layersToAdd);
},
addLayers: function (ids) {
var layersToAdd = [];
for (var i = ids.length - 1; i >= 0; i--) {
var layer = this._layers[ids[i]];
this.fire('addfeature', {
feature: layer.feature
});
layersToAdd.push(layer);
}
this.cluster.addLayers(layersToAdd);
},
removeLayers: function (ids, permanent) {
var layersToRemove = [];
for (var i = ids.length - 1; i >= 0; i--) {
var id = ids[i];
var layer = this._layers[id];
this.fire('removefeature', {
feature: layer.feature,
permanent: permanent
});
layersToRemove.push(layer);
if (this._layers[id] && permanent) {
delete this._layers[id];
}
}
this.cluster.removeLayers(layersToRemove);
},
removeLayers: function (ids, permanent) {
var layersToRemove = [];
for (var i = ids.length - 1; i >= 0; i--) {
var id = ids[i];
var layer = this._layers[id];
this.fire('removefeature', {
feature: layer.feature,
permanent: permanent
});
layersToRemove.push(layer);
if (this._layers[id] && permanent) {
delete this._layers[id];
}
}
this.cluster.removeLayers(layersToRemove);
},
/**
* Styling Methods
*/
/**
* Styling Methods
*/
resetStyle: function (id) {
var layer = this._layers[id];
resetStyle: function (id) {
var layer = this._layers[id];
if (layer) {
layer.options = layer.defaultOptions;
this.setFeatureStyle(layer.feature.id, this.options.style);
}
if (layer) {
layer.options = layer.defaultOptions;
this.setFeatureStyle(layer.feature.id, this.options.style);
}
return this;
},
return this;
},
setStyle: function (style) {
this.eachFeature(function (layer) {
this.setFeatureStyle(layer.feature.id, style);
}, this);
return this;
},
setStyle: function (style) {
this.eachFeature(function (layer) {
this.setFeatureStyle(layer.feature.id, style);
}, this);
return this;
},
setFeatureStyle: function (id, style) {
var layer = this._layers[id];
setFeatureStyle: function (id, style) {
var layer = this._layers[id];
if (typeof style === 'function') {
style = style(layer.feature);
}
if (layer.setStyle) {
layer.setStyle(style);
}
},
if (typeof style === 'function') {
style = style(layer.feature);
}
if (layer.setStyle) {
layer.setStyle(style);
}
},
/**
* Utility Methods
*/
/**
* Utility Methods
*/
eachFeature: function (fn, context) {
for (var i in this._layers) {
fn.call(context, this._layers[i]);
}
return this;
},
eachFeature: function (fn, context) {
for (var i in this._layers) {
fn.call(context, this._layers[i]);
}
return this;
},
getFeature: function (id) {
return this._layers[id];
}
});
getFeature: function (id) {
return this._layers[id];
}
});
function featureLayer (options) {
return new FeatureLayer(options);
}
function featureLayer (options) {
return new FeatureLayer(options);
}
exports.FeatureLayer = FeatureLayer;
exports.featureLayer = featureLayer;
exports['default'] = featureLayer;
exports.VERSION = version;
exports.FeatureLayer = FeatureLayer;
exports.featureLayer = featureLayer;
exports.default = featureLayer;
exports.VERSION = version;
}));
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXNyaS1sZWFmbGV0LWNsdXN0ZXItZGVidWcuanMiLCJzb3VyY2VzIjpbIi4uL3BhY2thZ2UuanNvbiIsIi4uL3NyYy9DbHVzdGVyZWRGZWF0dXJlTGF5ZXIuanMiXSwic291cmNlc0NvbnRlbnQiOlsie1xuICBcIm5hbWVcIjogXCJlc3JpLWxlYWZsZXQtY2x1c3RlclwiLFxuICBcImRlc2NyaXB0aW9uXCI6IFwiRXNyaSBMZWFmbGV0IHBsdWdpbiBmb3IgdmlzdWFsaXppbmcgRmVhdHVyZSBMYXllcnMgYXMgY2x1c3RlcnMgd2l0aCBMLm1hcmtlcmNsdXN0ZXIuXCIsXG4gIFwidmVyc2lvblwiOiBcIjIuMC4wXCIsXG4gIFwiYXV0aG9yXCI6IFwiUGF0cmljayBBcmx0IDxwYXJsdEBlc3JpLmNvbT4gKGh0dHA6Ly9wYXRyaWNrYXJsdC5jb20pXCIsXG4gIFwiY29udHJpYnV0b3JzXCI6IFtcbiAgICBcIlBhdHJpY2sgQXJsdCA8cGFybHRAZXNyaS5jb20+IChodHRwOi8vcGF0cmlja2FybHQuY29tKVwiLFxuICAgIFwiSm9obiBHcmF2b2lzIDxqZ3Jhdm9pc0Blc3Jp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FPLFNBQVMsWUFBWSxFQUFFLE9BQU8sRUFBRTtBQUN2QyxDQUFBLEVBQUUsT0FBTyxJQUFJLFlBQVksQ0FBQyxPQUFPLENBQUMsQ0FBQztBQUNuQyxDQUFBLENBQUM7Ozs7Ozs7In0=
Object.defineProperty(exports, '__esModule', { value: true });
})));

@@ -1,5 +0,4 @@

/* esri-leaflet-cluster - v2.0.0 - Thu Aug 18 2016 17:12:43 GMT-0700 (PDT)
* Copyright (c) 2016 Environmental Systems Research Institute, Inc.
/* esri-leaflet-cluster - v2.0.1 - Thu Sep 26 2019 15:47:35 GMT-0500 (Central Daylight Time)
* Copyright (c) 2019 Environmental Systems Research Institute, Inc.
* Apache-2.0 */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("leaflet"),require("esri-leaflet")):"function"==typeof define&&define.amd?define(["exports","leaflet","esri-leaflet"],t):t((e.L=e.L||{},e.L.esri=e.L.esri||{},e.L.esri.Cluster=e.L.esri.Cluster||{}),e.L,e.L.esri)}(this,function(e,t,r){"use strict";function s(e){return new a(e)}t="default"in t?t.default:t;var i="2.0.0",a=r.FeatureManager.extend({statics:{EVENTS:"click dblclick mouseover mouseout mousemove contextmenu popupopen popupclose",CLUSTEREVENTS:"clusterclick clusterdblclick clustermouseover clustermouseout clustermousemove clustercontextmenu"},initialize:function(e){r.FeatureManager.prototype.initialize.call(this,e),e=t.setOptions(this,e),this._layers={},this._leafletIds={},this.cluster=t.markerClusterGroup(e),this._key="c"+(1e9*Math.random()).toString(36).replace(".","_"),this.cluster.addEventParent(this)},onAdd:function(e){r.FeatureManager.prototype.onAdd.call(this,e),this._map.addLayer(this.cluster)},onRemove:function(e){r.FeatureManager.prototype.onRemove.call(this,e),this._map.removeLayer(this.cluster)},createLayers:function(e){for(var r=[],s=e.length-1;s>=0;s--){var i=e[s],a=this._layers[i.id];if(!a){var u=t.GeoJSON.geometryToLayer(i,this.options);u.feature=t.GeoJSON.asFeature(i),u.defaultOptions=u.options,u._leaflet_id=this._key+"_"+i.id,this.resetStyle(u.feature.id),this._layers[u.feature.id]=u,this._leafletIds[u._leaflet_id]=i.id,this.options.onEachFeature&&this.options.onEachFeature(u.feature,u),this.fire("createfeature",{feature:u.feature}),(!this.options.timeField||this.options.timeField&&this._featureWithinTimeRange(i))&&r.push(u)}}r.length&&this.cluster.addLayers(r)},addLayers:function(e){for(var t=[],r=e.length-1;r>=0;r--){var s=this._layers[e[r]];this.fire("addfeature",{feature:s.feature}),t.push(s)}this.cluster.addLayers(t)},removeLayers:function(e,t){for(var r=[],s=e.length-1;s>=0;s--){var i=e[s],a=this._layers[i];this.fire("removefeature",{feature:a.feature,permanent:t}),r.push(a),this._layers[i]&&t&&delete this._layers[i]}this.cluster.removeLayers(r)},resetStyle:function(e){var t=this._layers[e];return t&&(t.options=t.defaultOptions,this.setFeatureStyle(t.feature.id,this.options.style)),this},setStyle:function(e){return this.eachFeature(function(t){this.setFeatureStyle(t.feature.id,e)},this),this},setFeatureStyle:function(e,t){var r=this._layers[e];"function"==typeof t&&(t=t(r.feature)),r.setStyle&&r.setStyle(t)},eachFeature:function(e,t){for(var r in this._layers)e.call(t,this._layers[r]);return this},getFeature:function(e){return this._layers[e]}});e.FeatureLayer=a,e.featureLayer=s,e.default=s,e.VERSION=i});
//# sourceMappingURL=esri-leaflet-cluster.js.map
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("leaflet"),require("esri-leaflet")):"function"==typeof define&&define.amd?define(["exports","leaflet","esri-leaflet"],t):t((e.L=e.L||{},e.L.esri=e.L.esri||{},e.L.esri.Cluster={}),e.L,e.L.esri)}(this,function(e,t,r){"use strict";function s(e){return new i(e)}t=t&&t.hasOwnProperty("default")?t.default:t;var i=r.FeatureManager.extend({statics:{EVENTS:"click dblclick mouseover mouseout mousemove contextmenu popupopen popupclose",CLUSTEREVENTS:"clusterclick clusterdblclick clustermouseover clustermouseout clustermousemove clustercontextmenu"},initialize:function(e){r.FeatureManager.prototype.initialize.call(this,e),e=t.setOptions(this,e),this._layers={},this._leafletIds={},this.cluster=t.markerClusterGroup(e),this._key="c"+(1e9*Math.random()).toString(36).replace(".","_"),this.cluster.addEventParent(this)},onAdd:function(e){r.FeatureManager.prototype.onAdd.call(this,e),this._map.addLayer(this.cluster)},onRemove:function(e){r.FeatureManager.prototype.onRemove.call(this,e),this._map.removeLayer(this.cluster)},createLayers:function(e){for(var r=[],s=e.length-1;s>=0;s--){var i=e[s],a=this._layers[i.id];a||(a=t.GeoJSON.geometryToLayer(i,this.options),a.feature=t.GeoJSON.asFeature(i),a.defaultOptions=a.options,a._leaflet_id=this._key+"_"+i.id,this.resetStyle(a.feature.id),this._layers[a.feature.id]=a,this._leafletIds[a._leaflet_id]=i.id,this.options.onEachFeature&&this.options.onEachFeature(a.feature,a),this.fire("createfeature",{feature:a.feature})),(!this.options.timeField||this.options.timeField&&this._featureWithinTimeRange(i))&&r.push(a)}r.length&&this.cluster.addLayers(r)},addLayers:function(e){for(var t=[],r=e.length-1;r>=0;r--){var s=this._layers[e[r]];this.fire("addfeature",{feature:s.feature}),t.push(s)}this.cluster.addLayers(t)},removeLayers:function(e,t){for(var r=[],s=e.length-1;s>=0;s--){var i=e[s],a=this._layers[i];this.fire("removefeature",{feature:a.feature,permanent:t}),r.push(a),this._layers[i]&&t&&delete this._layers[i]}this.cluster.removeLayers(r)},resetStyle:function(e){var t=this._layers[e];return t&&(t.options=t.defaultOptions,this.setFeatureStyle(t.feature.id,this.options.style)),this},setStyle:function(e){return this.eachFeature(function(t){this.setFeatureStyle(t.feature.id,e)},this),this},setFeatureStyle:function(e,t){var r=this._layers[e];"function"==typeof t&&(t=t(r.feature)),r.setStyle&&r.setStyle(t)},eachFeature:function(e,t){for(var r in this._layers)e.call(t,this._layers[r]);return this},getFeature:function(e){return this._layers[e]}});e.FeatureLayer=i,e.featureLayer=s,e.default=s,e.VERSION="2.0.1",Object.defineProperty(e,"__esModule",{value:!0})});
// Karma configuration
// Generated on Fri May 30 2014 15:44:45 GMT-0400 (EDT)
module.exports = function(config) {
module.exports = function (config) {
config.set({

@@ -54,7 +54,7 @@

browsers: [
// 'Chrome',
'Chrome'
// 'ChromeCanary',
// 'Firefox',
// 'Safari',
'PhantomJS'
// 'PhantomJS'
],

@@ -68,4 +68,4 @@

coverageReporter: {
reporters:[
{type: 'html', dir:'coverage/'},
reporters: [
{type: 'html', dir: 'coverage/'},
{type: 'text'}

@@ -72,0 +72,0 @@ ]

{
"name": "esri-leaflet-cluster",
"description": "Esri Leaflet plugin for visualizing Feature Layers as clusters with L.markercluster.",
"version": "2.0.0",
"version": "2.0.1",
"author": "Patrick Arlt <parlt@esri.com> (http://patrickarlt.com)",

@@ -12,37 +12,37 @@ "contributors": [

"esri-leaflet": "^2.0.0",
"leaflet": "^1.0.0-rc.3",
"leaflet.markercluster": "git+https://github.com/Leaflet/Leaflet.markercluster.git#v1.0.0-rc.1"
"leaflet": "^1.0.0",
"leaflet.markercluster": "^1.0.0"
},
"devDependencies": {
"chai": "2.3.0",
"gh-release": "^2.0.0",
"http-server": "^0.8.5",
"isparta": "^3.0.3",
"gh-release": "^3.2.1",
"http-server": "^0.11.1",
"isparta": "^4.0.0",
"istanbul": "^0.4.2",
"karma": "^0.12.24",
"karma": "^2.0.2",
"karma-chai-sinon": "^0.1.3",
"karma-chrome-launcher": "^2.2.0",
"karma-coverage": "^0.5.3",
"karma-mocha": "^0.1.0",
"karma-mocha-reporter": "^0.2.5",
"karma-phantomjs-launcher": "^0.1.4",
"karma-sourcemap-loader": "^0.3.5",
"mkdirp": "^0.5.1",
"node-sass": "^3.2.0",
"phantomjs": "^1.9.17",
"rollup": "^0.25.4",
"mocha": "^5.2.0",
"node-sass": "sass/node-sass#v4.7.0",
"rollup": "^0.56.5",
"rollup-plugin-json": "^2.0.0",
"rollup-plugin-node-resolve": "^1.4.0",
"rollup-plugin-uglify": "^0.3.1",
"semistandard": "^7.0.4",
"semistandard": "^11.0.0",
"sinon": "^1.11.1",
"sinon-chai": "2.7.0",
"snazzy": "^2.0.1",
"snazzy": "^7.1.1",
"watch": "^0.17.1"
},
"homepage": "https://github.com/Esri/esri-leaflet-cluster",
"jsnext:main": "src/ClusteredFeatureLayer.js",
"jsnext:main": "src/ClusterFeatureLayer.js",
"jspm": {
"registry": "npm",
"format": "es6",
"main": "src/ClusteredFeatureLayer.js"
"main": "src/ClusterFeatureLayer.js"
},

@@ -59,2 +59,3 @@ "keywords": [

"main": "dist/esri-leaflet-cluster-debug.js",
"module": "src/ClusterFeatureLayer.js",
"readmeFilename": "README.md",

@@ -68,3 +69,3 @@ "repository": {

"build": "rollup -c profiles/debug.js & rollup -c profiles/production.js",
"lint": "semistandard src/*.js | snazzy",
"lint": "semistandard | snazzy",
"prepublish": "npm run build",

@@ -75,3 +76,10 @@ "pretest": "npm run build",

"test": "npm run lint && karma start"
},
"semistandard": {
"globals": [
"expect",
"L",
"sinon"
]
}
}
}
import config from '../node_modules/esri-leaflet/profiles/base.js';
config.entry = 'src/ClusteredFeatureLayer.js';
config.moduleName = 'L.esri.Cluster';
config.input = 'src/ClusterFeatureLayer.js';
config.output.name = 'L.esri.Cluster';
export default config;
export default config;
import config from './base.js';
config.dest = 'dist/esri-leaflet-cluster-debug.js';
config.sourceMap = 'inline';
config.output.file = 'dist/esri-leaflet-cluster-debug.js';
export default config;
export default config;
import uglify from 'rollup-plugin-uglify';
import config from './base.js'
import config from './base.js';
config.dest = 'dist/esri-leaflet-cluster.js';
config.sourceMap = 'dist/esri-leaflet-cluster.js.map';
config.output.file = 'dist/esri-leaflet-cluster.js';
// use a Regex to preserve copyright text
config.plugins.push(uglify({ output: { comments: /Institute, Inc/} }));
config.plugins.push(uglify({ output: { comments: /Institute, Inc/ } }));
export default config;
export default config;

@@ -14,3 +14,3 @@ # Esri Leaflet Cluster

<a href="http://esri.github.io/esri-leaflet/examples/clustering-feature-layers.html">
<img src="https://github.com/Esri/esri-leaflet-cluster/raw/master/esri-leaflet-clustered-feature-layer.jpg" alt="Demo">
<img src="https://github.com/Esri/esri-leaflet-cluster/raw/master/cluster-example.jpg" alt="Demo">
</a>

@@ -26,18 +26,23 @@

<!-- Load Leaflet from CDN-->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/leaflet/1.0.0-rc.3/leaflet.css" />
<script src="https://cdn.jsdelivr.net/leaflet/1.0.0-rc.3/leaflet-src.js"></script>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.1.0/dist/leaflet.css"
integrity="sha512-wcw6ts8Anuw10Mzh9Ytw4pylW8+NAD4ch3lqm9lzAsTxg0GFeJgoAtxuCLREZSC5lUXdVyo/7yfsqFjQ4S+aKw=="
crossorigin=""/>
<script src="https://unpkg.com/leaflet@1.1.0/dist/leaflet.js"
integrity="sha512-mNqn2Wg7tSToJhvHcqfzLMU6J4mkOImSPTxVZAdo+lcPlk+GhZmYgACEe0x35K7YzW1zJ7XyJV/TT1MrdXvMcA=="
crossorigin=""></script>
<!-- Load Esri Leaflet from CDN -->
<script src="http://cdn.jsdelivr.net/leaflet.esri/2.0.2/esri-leaflet.js"></script>
<script src="https://unpkg.com/esri-leaflet@2.1.0/dist/esri-leaflet.js"
integrity="sha512-Tojl3UMd387f6DdAJlo+fKfJZiP55fYT+6Y58yKbHydnueOdSFOxrgLPuUxm7VW1szEt3hZVwv3V2sSUCuT35w=="
crossorigin=""></script>
<!-- Include Leaflet.markercluster via rawgit.com
in production you'd be better off hosting these libraries yourself -->
<link rel="stylesheet" type="text/css" href="https://cdn.rawgit.com/Leaflet/Leaflet.markercluster/v1.0.0-rc.1/dist/MarkerCluster.Default.css">
<link rel="stylesheet" type="text/css" href="https://cdn.rawgit.com/Leaflet/Leaflet.markercluster/v1.0.0-rc.1/dist/MarkerCluster.css">
<script src="https://cdn.rawgit.com/Leaflet/Leaflet.markercluster/v1.0.0-rc.1/dist/leaflet.markercluster.js"></script>
<link rel="stylesheet" type="text/css" href="https://unpkg.com/leaflet.markercluster@1.0.4/dist/MarkerCluster.Default.css">
<link rel="stylesheet" type="text/css" href="https://unpkg.com/leaflet.markercluster@1.0.4/dist/MarkerCluster.css">
<script src="https://unpkg.com/leaflet.markercluster@1.0.4/dist/leaflet.markercluster.js"></script>
<!-- Load Esri Leaflet Cluster from CDN -->
<script src="https://unpkg.com/esri-leaflet-cluster@2.0.0/dist/esri-leaflet-cluster.js"
integrity="sha512-mhpdD3igvv7A/84hueuHzV0NIKFHmp2IvWnY5tIdtAHkHF36yySdstEVI11JZCmSY4TCvOkgEoW+zcV/rUfo0A=="
crossorigin=""></script>
<!-- Load Clustered Feature Layer from CDN -->
<script src="https://cdn.jsdelivr.net/leaflet.esri.cluster/2.0.0/esri-leaflet-cluster.js"></script>
<style>

@@ -67,17 +72,13 @@ body {margin:0;padding:0;}

A full [API Reference](http://esri.github.io/esri-leaflet/api-reference/) and plenty of [sample code](http://esri.github.io/esri-leaflet/examples/) can be found at the [Esri Leaflet](http://esri.github.io/esri-leaflet/) website.
A full [API Reference](http://esri.github.io/esri-leaflet/api-reference/layers/cluster-feature-layer.html) and examples can be found on the [Esri Leaflet](http://esri.github.io/esri-leaflet/) website.
### Development Roadmap
If you are interested in contributing to Esri Leaflet or are interetsed in seeing what is coming up next checkout the [development roadmap](https://github.com/Esri/esri-leaflet/wiki/Roadmap).
### Development Instructions
Make Sure you have the [Grunt CLI](http://gruntjs.com/getting-started) installed.
If you'd like to inspect and modify the source of Esri Leaflet Cluster, follow the instructions below to set up a local development environment.
1. [Fork and clone this repo](https://help.github.com/articles/fork-a-repo)
2. `cd` into the `esri-leaflet` folder
3. Install the dependencies with `npm install`
4. run `grunt` from the command line. This will start watching the source files and running linting and testing commands.
5. Open `debug/sample.html` which will load up a development environment.
1. [Fork and clone Esri Leaflet Cluster](https://help.github.com/articles/fork-a-repo)
2. `cd` into the `esri-leaflet-cluster` folder
3. Install the [`package.json`](https://github.com/Esri/esri-leaflet/blob/master/package.json#L14-L49) 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](https://help.github.com/articles/creating-a-pull-request)

@@ -87,3 +88,3 @@

* version [1.0.2](https://github.com/Esri/esri-leaflet-clustered-feature-layer/releases/tag/v1.0.2) (available on [CDN](https://cdn.jsdelivr.net/leaflet.esri.clustered-feature-layer/1.0.2/esri-leaflet-clustered-feature-layer.js)) can be used in apps alongside:
* version [1.0.2](https://github.com/Esri/esri-leaflet-cluster/releases/tag/v1.0.2) (available on [CDN](https://cdn.jsdelivr.net/leaflet.esri.clustered-feature-layer/1.0.2/esri-leaflet-clustered-feature-layer.js)) can be used in apps alongside:
* [Leaflet](http://leafletjs.com) version `0.7.x`.

@@ -93,6 +94,6 @@ * Esri Leaflet version `1.x`

* version [2.0.0-beta.1](https://github.com/Esri/esri-leaflet-clustered-feature-layer/releases/tag/v2.0.0-beta.1) (available on [CDN](https://cdn.jsdelivr.net/leaflet.esri.clustered-feature-layer/2.0.0-beta.1/esri-leaflet-clustered-feature-layer.js)) can be used in apps alongside:
* [Leaflet](http://leafletjs.com) version `1.0.0-rc.3`.
* version [2.0.0](https://github.com/Esri/esri-leaflet-cluster/releases/tag/v2.0.0) (available on [CDN](https://unpkg.com/esri-leaflet-cluster@2.0.0)) can be used in apps alongside:
* [Leaflet](http://leafletjs.com) version `1.x`.
* Esri Leaflet version `2.x`
* [Leaflet.markercluster](https://github.com/Leaflet/Leaflet.markercluster) version `1.0.0-rc.1`
* [Leaflet.markercluster](https://github.com/Leaflet/Leaflet.markercluster) version `1.x`

@@ -109,5 +110,5 @@ ### Resources

Find a bug or want to request a new feature? Please let us know by submitting an [issue](https://github.com/Esri/esri-leaflet-clustered-feature-layer/issues).
Find a bug or want to request a new feature? Please let us know by submitting an [issue](https://github.com/Esri/esri-leaflet-cluster/issues).
Please take a look at [previous issues on Esri Leaflet](https://github.com/Esri/esri-leaflet/issues?labels=FAQ&milestone=&page=1&state=closed) and [previous issues on Esri Leaflet Clustered Feature Layer](https://github.com/Esri/esri-leaflet-clustered-feature-layer/issues?labels=FAQ&milestone=&page=1&state=closed)that resolve common problems.
Please take a look at [previous Esri Leaflet issues](https://github.com/Esri/esri-leaflet/issues?labels=FAQ&milestone=&page=1&state=closed) and [previous Esri Leaflet Cluster issues](https://github.com/Esri/esri-leaflet-cluster/issues?labels=FAQ&milestone=&page=1&state=closed)that resolve common problems.

@@ -121,3 +122,3 @@ You can also post issues on the [GIS Stackexchange](http://gis.stackexchange.com/questions/ask?tags=esri-leaflet,leaflet) an/or the [Esri Leaflet place](https://geonet.esri.com/discussion/create.jspa?sr=pmenu&containerID=1841&containerType=700&tags=esri-leaflet,leaflet) on GeoNet.

### Licensing
Copyright 2016 Esri
Copyright 2017 Esri

@@ -136,5 +137,2 @@ Licensed under the Apache License, Version 2.0 (the "License");

A copy of the license is available in the repository's [LICENSE](./LICENSE) file.
[](Esri Tags: ArcGIS Web Mapping Leaflet)
[](Esri Language: JavaScript)
A copy of the license is available in the repository's [LICENSE](./LICENSE) file.

Sorry, the diff of this file is not supported yet

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