don't load google layers when gmaps is not loaded

This commit is contained in:
javi 2013-08-29 15:21:54 +02:00
parent 0449674e6b
commit 463ff67642
3 changed files with 8 additions and 0 deletions

View File

@ -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];
};
}

View File

@ -1,5 +1,7 @@
(function(exports) {
if(typeof(google) === 'undefined' || typeof(google.maps) === 'undefined') return;
function GMapsTileLoader() {
}

View File

@ -1,5 +1,7 @@
(function(exports) {
if(typeof(google) === 'undefined' || typeof(google.maps) === 'undefined') return;
function GMapsTorqueLayer(options) {
var self = this;
this.key = 0;