adds error handling to gmaps

This commit is contained in:
Francisco Dans 2015-04-15 11:20:20 +02:00
parent 8d8d65050d
commit 2652f6c6d8

View File

@ -91,6 +91,7 @@ GMapsTorqueLayer.prototype = torque.extend({},
this.provider = new this.providers[this.options.provider](this.options);
this.renderer = new this.renderers[this.options.renderer](this.getCanvas(), this.options);
this.renderer.options.errorCallback = this.options.errorCallback;
// this listener should be before tile loader
this._cacheListener = google.maps.event.addListener(this.options.map, 'zoom_changed', function() {
@ -333,6 +334,10 @@ GMapsTorqueLayer.prototype = torque.extend({},
}
}
return sum;
},
error: function (callback) {
this.options.errorCallback = callback;
}
});