From caf49e2a516118b30224b3750e39fba95f3b0793 Mon Sep 17 00:00:00 2001 From: javi Date: Mon, 30 Sep 2013 16:31:47 +0200 Subject: [PATCH] avoid loading leaflet layers when leaflet is not present --- lib/torque/leaflet/canvas_layer.js | 3 +++ lib/torque/leaflet/leaflet_tileloader_mixin.js | 3 +++ lib/torque/leaflet/torque.js | 2 ++ 3 files changed, 8 insertions(+) diff --git a/lib/torque/leaflet/canvas_layer.js b/lib/torque/leaflet/canvas_layer.js index 66605d8..e7ddcd9 100644 --- a/lib/torque/leaflet/canvas_layer.js +++ b/lib/torque/leaflet/canvas_layer.js @@ -1,3 +1,4 @@ +if(typeof(L) !== 'undefined') { /** * full canvas layer implementation for Leaflet */ @@ -120,3 +121,5 @@ L.CanvasLayer = L.Class.extend({ } }); + +} //L defined diff --git a/lib/torque/leaflet/leaflet_tileloader_mixin.js b/lib/torque/leaflet/leaflet_tileloader_mixin.js index 9d24be4..c0d9100 100644 --- a/lib/torque/leaflet/leaflet_tileloader_mixin.js +++ b/lib/torque/leaflet/leaflet_tileloader_mixin.js @@ -1,3 +1,4 @@ +if(typeof(L) !== 'undefined') { L.Mixin.TileLoader = { @@ -128,3 +129,5 @@ L.Mixin.TileLoader = { } } + +} //L defined diff --git a/lib/torque/leaflet/torque.js b/lib/torque/leaflet/torque.js index f61d50f..996af1c 100644 --- a/lib/torque/leaflet/torque.js +++ b/lib/torque/leaflet/torque.js @@ -1,3 +1,4 @@ +if(typeof(L) !== 'undefined') { /** * torque layer */ @@ -216,3 +217,4 @@ L.TiledTorqueLayer = L.TileLayer.Canvas.extend({ }); +} //L defined