From 00e3ddfe99f54dec5c8f4f0c481248aa93e0a6ff Mon Sep 17 00:00:00 2001 From: Francisco Dans Date: Tue, 22 Sep 2015 11:48:48 +0200 Subject: [PATCH] uses tilejson provider when option is specified --- lib/torque/leaflet/torque.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/torque/leaflet/torque.js b/lib/torque/leaflet/torque.js index 1882773..e5be027 100644 --- a/lib/torque/leaflet/torque.js +++ b/lib/torque/leaflet/torque.js @@ -11,7 +11,8 @@ L.TorqueLayer = L.CanvasLayer.extend({ providers: { 'sql_api': torque.providers.json, 'url_template': torque.providers.JsonArray, - 'windshaft': torque.providers.windshaft + 'windshaft': torque.providers.windshaft, + 'tileJSON': torque.providers.tileJSON }, renderers: { @@ -66,6 +67,8 @@ L.TorqueLayer = L.CanvasLayer.extend({ this.options.renderer = this.options.renderer || 'point'; this.options.provider = this.options.provider || 'windshaft'; + if (this.options.tileJSON) this.options.provider = 'tileJSON'; + this.provider = new this.providers[this.options.provider](options); this.renderer = new this.renderers[this.options.renderer](this.getCanvas(), options);