From b9531f95ceab479667760287158dc863a3eed69a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20L=C3=B3pez?= Date: Mon, 16 Jan 2017 11:32:43 +0100 Subject: [PATCH 1/3] Repair broken reference --- lib/torque/gmaps/torque.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/torque/gmaps/torque.js b/lib/torque/gmaps/torque.js index 6a29a46..dff7f82 100644 --- a/lib/torque/gmaps/torque.js +++ b/lib/torque/gmaps/torque.js @@ -63,7 +63,7 @@ function GMapsTorqueLayer(options) { CanvasLayer.call(this, { - map: this.options.map, + map: this.map, //resizeHandler: this.redraw, animate: false, updateHandler: this.render, @@ -115,11 +115,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 +184,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) { From 7a33d8a1de752dde9e86f6e0eda283b418603537 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20L=C3=B3pez?= Date: Mon, 30 Jan 2017 10:05:58 +0100 Subject: [PATCH 2/3] Remove map as an option to clarify --- lib/torque/gmaps/torque.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/torque/gmaps/torque.js b/lib/torque/gmaps/torque.js index dff7f82..eb9e687 100644 --- a/lib/torque/gmaps/torque.js +++ b/lib/torque/gmaps/torque.js @@ -63,8 +63,6 @@ function GMapsTorqueLayer(options) { CanvasLayer.call(this, { - map: this.map, - //resizeHandler: this.redraw, animate: false, updateHandler: this.render, readyHandler: this.initialize From db8ad92e33777f802207e36047dddd811f4b1d9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20L=C3=B3pez?= Date: Mon, 30 Jan 2017 12:23:25 +0100 Subject: [PATCH 3/3] Remove map instance as an option in example --- examples/navy_gmaps.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/navy_gmaps.html b/examples/navy_gmaps.html index 3801d46..bbbee44 100644 --- a/examples/navy_gmaps.html +++ b/examples/navy_gmaps.html @@ -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){