|
|
|
@ -33,8 +33,8 @@ L.TorqueLayer = L.CanvasLayer.extend({
|
|
|
|
|
this.stop = this.animator.stop.bind(this.animator);
|
|
|
|
|
this.pause = this.animator.pause.bind(this.animator);
|
|
|
|
|
this.toggle = this.animator.toggle.bind(this.animator);
|
|
|
|
|
this.setDuration = this.animator.duration.bind(this.animator);
|
|
|
|
|
|
|
|
|
|
this.setBlendMode = this.renderer.setBlendMode.bind(this.renderer);
|
|
|
|
|
|
|
|
|
|
L.CanvasLayer.prototype.initialize.call(this, options);
|
|
|
|
|
|
|
|
|
@ -44,6 +44,8 @@ L.TorqueLayer = L.CanvasLayer.extend({
|
|
|
|
|
this.provider = new this.providers[this.options.provider](options);
|
|
|
|
|
this.renderer = new this.renderers[this.options.renderer](this.getCanvas(), options);
|
|
|
|
|
|
|
|
|
|
this.setBlendMode = this.renderer.setBlendMode.bind(this.renderer);
|
|
|
|
|
|
|
|
|
|
// for each tile shown on the map request the data
|
|
|
|
|
this.on('tileAdded', function(t) {
|
|
|
|
|
var tileData = this.provider.getTileData(t, t.zoom, function(tileData) {
|
|
|
|
@ -53,6 +55,11 @@ L.TorqueLayer = L.CanvasLayer.extend({
|
|
|
|
|
}, this);
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
setSteps: function(steps) {
|
|
|
|
|
this.provider.setSteps(steps);
|
|
|
|
|
this._reloadTiles();
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* render the selectef key
|
|
|
|
|
* don't call this function directly, it's called by
|
|
|
|
|