aboutsummaryrefslogtreecommitdiffstats
path: root/extlib/leaflet/src/layer/LayerGroup.js
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2015-02-14 13:34:41 -0600
committerChristopher Allan Webber <cwebber@dustycloud.org>2015-02-17 15:48:28 -0600
commit9252fc84840220106e696cc2116e7804c9529c5a (patch)
treec1bafe27ad0cac8e4b49bd476ad2e3947fe4fca9 /extlib/leaflet/src/layer/LayerGroup.js
parent572106e23037997db9a4e131029b0a4f7cb969b5 (diff)
downloadmediagoblin-9252fc84840220106e696cc2116e7804c9529c5a.tar.lz
mediagoblin-9252fc84840220106e696cc2116e7804c9529c5a.tar.xz
mediagoblin-9252fc84840220106e696cc2116e7804c9529c5a.zip
Remove extlib deps moved into bower
Diffstat (limited to 'extlib/leaflet/src/layer/LayerGroup.js')
-rw-r--r--extlib/leaflet/src/layer/LayerGroup.js58
1 files changed, 0 insertions, 58 deletions
diff --git a/extlib/leaflet/src/layer/LayerGroup.js b/extlib/leaflet/src/layer/LayerGroup.js
deleted file mode 100644
index 58940d40..00000000
--- a/extlib/leaflet/src/layer/LayerGroup.js
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * L.LayerGroup is a class to combine several layers so you can manipulate the group (e.g. add/remove it) as one layer.
- */
-
-L.LayerGroup = L.Class.extend({
- initialize: function(layers) {
- this._layers = {};
-
- if (layers) {
- for (var i = 0, len = layers.length; i < len; i++) {
- this.addLayer(layers[i]);
- }
- }
- },
-
- addLayer: function(layer) {
- var id = L.Util.stamp(layer);
- this._layers[id] = layer;
-
- if (this._map) {
- this._map.addLayer(layer);
- }
- return this;
- },
-
- removeLayer: function(layer) {
- var id = L.Util.stamp(layer);
- delete this._layers[id];
-
- if (this._map) {
- this._map.removeLayer(layer);
- }
- return this;
- },
-
- clearLayers: function() {
- this._iterateLayers(this.removeLayer, this);
- return this;
- },
-
- onAdd: function(map) {
- this._map = map;
- this._iterateLayers(map.addLayer, map);
- },
-
- onRemove: function(map) {
- this._iterateLayers(map.removeLayer, map);
- delete this._map;
- },
-
- _iterateLayers: function(method, context) {
- for (var i in this._layers) {
- if (this._layers.hasOwnProperty(i)) {
- method.call(context, this._layers[i]);
- }
- }
- }
-}); \ No newline at end of file