leaflet-tile-loading-progress-control
Advanced tools
Comparing version 1.0.8 to 1.0.9
/* @preserve | ||
* Leaflet Control TileLoadingProgress 1.0.8 | ||
* Leaflet Control TileLoadingProgress 1.0.9 | ||
* https://github.com/jbccollins/leaflet-tile-loading-progress-control | ||
@@ -23,10 +23,6 @@ * | ||
initialize: function (options) { | ||
// constructor | ||
this.handleLoadingStatusUpdate = this.handleLoadingStatusUpdate.bind(this); | ||
this.handleTileLoadStart = this.handleTileLoadStart.bind(this); | ||
this.handleTileUnload = this.handleTileUnload.bind(this); | ||
this.handleTileLoad = this.handleTileLoad.bind(this); | ||
this.handleLayerLoading = this.handleLayerLoading.bind(this); | ||
this.handleTileError = this.handleTileError.bind(this); | ||
this.handleLayerLoad = this.handleLayerLoad.bind(this); | ||
this.getTileStatusCounts = this.getTileStatusCounts.bind(this); | ||
@@ -65,14 +61,8 @@ L.Util.setOptions(this, options); | ||
}, | ||
onRemove: function (map) { | ||
// when removed | ||
}, | ||
unbindLoadEventTriggers: function() { | ||
for (var key in this.options.leafletElt._layers) { | ||
var layer = this.options.leafletElt._layers[key]; | ||
layer.off('tileloadstart', this.handleTileLoadStart); | ||
layer.off('tileunload', this.handleTileUnload); | ||
layer.off('tileload', this.handleTileLoad); | ||
layer.off('loading', this.handleLayerLoading); | ||
layer.off('tileerror', this.handleTileError); | ||
layer.off('load', this.handleLayerLoad); | ||
} | ||
@@ -83,12 +73,8 @@ }, | ||
var layer = this.options.leafletElt._layers[key]; | ||
layer.on('tileloadstart', this.handleTileLoadStart); | ||
layer.on('tileunload', this.handleTileUnload); | ||
layer.on('tileload', this.handleTileLoad); | ||
layer.on('loading', this.handleLayerLoading); | ||
layer.on('tileerror', this.handleTileError); | ||
layer.on('load', this.handleLayerLoad); | ||
} | ||
}, | ||
handleLoadingStatusUpdate: function () { | ||
var status = null; | ||
var status = { | ||
@@ -115,20 +101,11 @@ loading: 0, | ||
}, | ||
handleLayerLoading: function (e) { | ||
handleLayerLoading: function () { | ||
this.handleLoadingStatusUpdate(); | ||
}, | ||
handleTileLoadStart: function (e) { | ||
handleTileLoad: function () { | ||
this.handleLoadingStatusUpdate(); | ||
}, | ||
handleTileLoad: function (e) { | ||
handleTileError: function () { | ||
this.handleLoadingStatusUpdate(); | ||
}, | ||
handleTileError: function (e) { | ||
this.handleLoadingStatusUpdate(); | ||
}, | ||
handleTileUnload: function (e) { | ||
this.handleLoadingStatusUpdate(); | ||
}, | ||
handleLayerLoad: function (e) { | ||
//console.log('loaded'); | ||
}, | ||
getTileStatusCounts: function (l) { | ||
@@ -135,0 +112,0 @@ var status = { |
{ | ||
"name": "leaflet-tile-loading-progress-control", | ||
"version": "1.0.8", | ||
"version": "1.0.9", | ||
"description": "A leaflet control that indicates tile loading progress for a group of tile layers", | ||
@@ -5,0 +5,0 @@ "main": "dist/Control.TileLoadingProgress.js", |
@@ -9,10 +9,6 @@ import L from 'leaflet'; | ||
initialize: function (options) { | ||
// constructor | ||
this.handleLoadingStatusUpdate = this.handleLoadingStatusUpdate.bind(this); | ||
this.handleTileLoadStart = this.handleTileLoadStart.bind(this); | ||
this.handleTileUnload = this.handleTileUnload.bind(this); | ||
this.handleTileLoad = this.handleTileLoad.bind(this); | ||
this.handleLayerLoading = this.handleLayerLoading.bind(this); | ||
this.handleTileError = this.handleTileError.bind(this); | ||
this.handleLayerLoad = this.handleLayerLoad.bind(this); | ||
this.getTileStatusCounts = this.getTileStatusCounts.bind(this); | ||
@@ -51,14 +47,8 @@ L.Util.setOptions(this, options); | ||
}, | ||
onRemove: function (map) { | ||
// when removed | ||
}, | ||
unbindLoadEventTriggers: function() { | ||
for (var key in this.options.leafletElt._layers) { | ||
var layer = this.options.leafletElt._layers[key]; | ||
layer.off('tileloadstart', this.handleTileLoadStart); | ||
layer.off('tileunload', this.handleTileUnload); | ||
layer.off('tileload', this.handleTileLoad); | ||
layer.off('loading', this.handleLayerLoading); | ||
layer.off('tileerror', this.handleTileError); | ||
layer.off('load', this.handleLayerLoad); | ||
} | ||
@@ -69,12 +59,8 @@ }, | ||
var layer = this.options.leafletElt._layers[key]; | ||
layer.on('tileloadstart', this.handleTileLoadStart); | ||
layer.on('tileunload', this.handleTileUnload); | ||
layer.on('tileload', this.handleTileLoad); | ||
layer.on('loading', this.handleLayerLoading); | ||
layer.on('tileerror', this.handleTileError); | ||
layer.on('load', this.handleLayerLoad); | ||
} | ||
}, | ||
handleLoadingStatusUpdate: function () { | ||
var status = null; | ||
var status = { | ||
@@ -101,20 +87,11 @@ loading: 0, | ||
}, | ||
handleLayerLoading: function (e) { | ||
handleLayerLoading: function () { | ||
this.handleLoadingStatusUpdate(); | ||
}, | ||
handleTileLoadStart: function (e) { | ||
handleTileLoad: function () { | ||
this.handleLoadingStatusUpdate(); | ||
}, | ||
handleTileLoad: function (e) { | ||
handleTileError: function () { | ||
this.handleLoadingStatusUpdate(); | ||
}, | ||
handleTileError: function (e) { | ||
this.handleLoadingStatusUpdate(); | ||
}, | ||
handleTileUnload: function (e) { | ||
this.handleLoadingStatusUpdate(); | ||
}, | ||
handleLayerLoad: function (e) { | ||
//console.log('loaded'); | ||
}, | ||
getTileStatusCounts: function (l) { | ||
@@ -121,0 +98,0 @@ var status = { |
Sorry, the diff of this file is not supported yet
119476
356