Merge branch '2.12' of git://github.com/openlayers/openlayers

This commit is contained in:
Tim Schaub
2012-04-04 14:50:53 -10:00
6 changed files with 13 additions and 11 deletions

View File

@@ -173,11 +173,13 @@ OpenLayers.Control.CacheWrite = OpenLayers.Class(OpenLayers.Control, {
try {
var canvasContext = tile.getCanvasContext();
if (canvasContext) {
var urlMap = OpenLayers.Control.CacheWrite.urlMap;
var url = urlMap[tile.url] || tile.url;
window.localStorage.setItem(
"olCache_" + OpenLayers.Control.CacheWrite.urlMap[tile.url],
"olCache_" + url,
canvasContext.canvas.toDataURL(this.imageFormat)
);
delete OpenLayers.Control.CacheWrite.urlMap[tile.url];
delete urlMap[tile.url];
}
} catch(e) {
// local storage full or CORS violation

View File

@@ -211,14 +211,14 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, {
* {String} Name of the class added to the layer div. If not set in the
* options passed to the constructor then className defaults to
* "olLayerGridSingleTile" for single tile layers (see <singleTile>),
* and "olLayerGridTile" for non single tile layers.
* and "olLayerGrid" for non single tile layers.
*
* Note:
*
* The displaying of tiles is not animated by default for single tile
* layers - OpenLayers' default theme (style.css) includes this:
* (code)
* .olLayerGridTile .olTileImage {
* .olLayerGrid .olTileImage {
* -webkit-transition: opacity 0.2s linear;
* -moz-transition: opacity 0.2s linear;
* -o-transition: opacity 0.2s linear;
@@ -291,7 +291,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, {
if (this.className === null) {
this.className = this.singleTile ? 'olLayerGridSingleTile' :
'olLayerGridTile';
'olLayerGrid';
}
if (!OpenLayers.Animation.isNative) {