Handle limits error in GMaps
This commit is contained in:
parent
e83bcaee6d
commit
5d89990119
@ -180,7 +180,7 @@ GMapsTorqueLayer.prototype = torque.extend({},
|
||||
// for each tile shown on the map request the data
|
||||
onTileAdded: function(t) {
|
||||
var self = this;
|
||||
this.provider.getTileData(t, t.zoom, function(tileData) {
|
||||
var successCallback = function (tileData) {
|
||||
// don't load tiles that are not being shown
|
||||
if (t.zoom !== self.map.getZoom()) return;
|
||||
self._tileLoaded(t, tileData);
|
||||
@ -188,7 +188,12 @@ GMapsTorqueLayer.prototype = torque.extend({},
|
||||
if (tileData) {
|
||||
self.redraw();
|
||||
}
|
||||
});
|
||||
};
|
||||
var errorCallback = function (error) {
|
||||
self.fire('tileError', error);
|
||||
}
|
||||
|
||||
this.provider.getTileData(t, t.zoom, successCallback, errorCallback);
|
||||
},
|
||||
|
||||
clear: function() {
|
||||
|
Loading…
Reference in New Issue
Block a user