[OpenLayers-Commits] r11990 -
sandbox/ahocevar/google-ng/lib/OpenLayers/Tile
commits-20090109 at openlayers.org
commits-20090109 at openlayers.org
Mon May 23 01:58:03 EDT 2011
Author: ahocevar
Date: 2011-05-22 22:58:02 -0700 (Sun, 22 May 2011)
New Revision: 11990
Modified:
sandbox/ahocevar/google-ng/lib/OpenLayers/Tile/Google.js
Log:
release the temporary tile when it's no longer used
Modified: sandbox/ahocevar/google-ng/lib/OpenLayers/Tile/Google.js
===================================================================
--- sandbox/ahocevar/google-ng/lib/OpenLayers/Tile/Google.js 2011-05-22 22:04:32 UTC (rev 11989)
+++ sandbox/ahocevar/google-ng/lib/OpenLayers/Tile/Google.js 2011-05-23 05:58:02 UTC (rev 11990)
@@ -98,12 +98,13 @@
// done by requesting the tile for just the satellite mapType
// first, before requesting the hybrid one.
//TODO revisit this - it may be a temporary issue with GMaps
+ var tempTile;
if (this.layer.type === google.maps.MapTypeId.HYBRID) {
- layerType.getTile(point, xyz.z, document);
+ tempTile = layerType.getTile(point, xyz.z, document);
}
this.node = layerType.getTile(point, xyz.z, document);
-
+
this.isLoading = true;
this.events.triggerEvent("loadstart");
@@ -119,6 +120,12 @@
window.setTimeout(OpenLayers.Function.bind(function() {
this.isLoading = false;
this.events.triggerEvent("loadend");
+
+ // see hybrid tile issue above
+ //TODO revisit this - it may be a temporary issue with GMaps
+ if (tempTile) {
+ layerType.releaseTile(tempTile);
+ }
}, this), 0);
}
return true;
More information about the Commits
mailing list