Merge pull request #279 from CartoDB/gmaps-support
Repair broken reference
This commit is contained in:
commit
c847784a8f
@ -74,8 +74,7 @@
|
||||
var torqueLayer = new torque.GMapsTorqueLayer({
|
||||
user : 'viz2',
|
||||
table : 'ow',
|
||||
cartocss: CARTOCSS,
|
||||
map: map
|
||||
cartocss: CARTOCSS
|
||||
});
|
||||
torqueLayer.error(function(err){
|
||||
for(error in err){
|
||||
|
@ -63,8 +63,6 @@ function GMapsTorqueLayer(options) {
|
||||
|
||||
|
||||
CanvasLayer.call(this, {
|
||||
map: this.options.map,
|
||||
//resizeHandler: this.redraw,
|
||||
animate: false,
|
||||
updateHandler: this.render,
|
||||
readyHandler: this.initialize
|
||||
@ -115,11 +113,11 @@ GMapsTorqueLayer.prototype = torque.extend({},
|
||||
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() {
|
||||
this._cacheListener = google.maps.event.addListener(this.map, 'zoom_changed', function() {
|
||||
self.renderer && self.renderer.clearSpriteCache();
|
||||
});
|
||||
|
||||
this._initTileLoader(this.options.map, this.getProjection());
|
||||
this._initTileLoader(this.map, this.getProjection());
|
||||
|
||||
if (this.shader) {
|
||||
this.renderer.setShader(this.shader);
|
||||
@ -184,7 +182,7 @@ GMapsTorqueLayer.prototype = torque.extend({},
|
||||
var self = this;
|
||||
this.provider.getTileData(t, t.zoom, function(tileData) {
|
||||
// don't load tiles that are not being shown
|
||||
if (t.zoom !== self.options.map.getZoom()) return;
|
||||
if (t.zoom !== self.map.getZoom()) return;
|
||||
self._tileLoaded(t, tileData);
|
||||
self.fire('tileLoaded');
|
||||
if (tileData) {
|
||||
|
Loading…
Reference in New Issue
Block a user