Ticket #1402: google.patch
| File google.patch, 1.2 kB (added by overstdr, 10 months ago) |
|---|
-
lib/OpenLayers/Layer/Google.js
old new 123 123 termsOfUse.style.bottom = ""; 124 124 125 125 //can we do smooth panning? (some versions don't) 126 if ( !this.mapObject.G || !this.mapObject.G.qb || 127 (typeof this.mapObject.G.qb != "function") ) { 128 126 if ( !this.mapObject.G || (!this.mapObject.G.qb && !this.mapObject.G.vb) || 127 (typeof this.mapObject.G.qb != "function" && typeof this.mapObject.G.vb != "function")) { 129 128 this.dragPanMapObject = null; 130 129 } 131 130 … … 342 341 * dY - {Integer} 343 342 */ 344 343 dragPanMapObject: function(dX, dY) { 345 var newX = this.mapObject.G.left - dX; 346 var newY = this.mapObject.G.top + dY; 347 this.mapObject.G.qb(newX, newY); 344 try { 345 var newX = this.mapObject.G.left - dX; 346 var newY = this.mapObject.G.top + dY; 347 if(this.mapObject.G.qb) { 348 this.mapObject.G.qb(newX, newY); 349 } else if(this.mapObject.G.vb) { 350 this.mapObject.G.vb(newX, newY); 351 } 352 } catch(e) { 353 //prevent failures. 354 } 348 355 }, 349 356 350 357 /**
