diff --git a/lib/torque/gmaps/canvas_tile_layer.js b/lib/torque/gmaps/canvas_tile_layer.js index 302d774..7b59efe 100644 --- a/lib/torque/gmaps/canvas_tile_layer.js +++ b/lib/torque/gmaps/canvas_tile_layer.js @@ -4,6 +4,8 @@ ==================== */ +if(typeof(google) !== 'undefined' && typeof(google.maps) !== 'undefined') { + function CanvasTileLayer(canvas_setup, render) { this.tileSize = new google.maps.Size(256, 256); this.maxZoom = 19; @@ -92,3 +94,5 @@ CanvasTileLayer.prototype.releaseTile = function (tile) { var id = tile.getAttribute('id'); delete this.tiles[id]; }; + +} diff --git a/lib/torque/gmaps/gmaps_tileloader_mixin.js b/lib/torque/gmaps/gmaps_tileloader_mixin.js index 7d79436..d98dc93 100644 --- a/lib/torque/gmaps/gmaps_tileloader_mixin.js +++ b/lib/torque/gmaps/gmaps_tileloader_mixin.js @@ -1,5 +1,7 @@ (function(exports) { +if(typeof(google) === 'undefined' || typeof(google.maps) === 'undefined') return; + function GMapsTileLoader() { } diff --git a/lib/torque/gmaps/torque.js b/lib/torque/gmaps/torque.js index 983039e..7ee5287 100644 --- a/lib/torque/gmaps/torque.js +++ b/lib/torque/gmaps/torque.js @@ -1,5 +1,7 @@ (function(exports) { +if(typeof(google) === 'undefined' || typeof(google.maps) === 'undefined') return; + function GMapsTorqueLayer(options) { var self = this; this.key = 0;