From afce5be5d6b256b75f5b69b975fdb51621dcf7fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Fri, 30 Dec 2011 23:23:07 +0100 Subject: [PATCH] add a tileAnimation map option --- lib/OpenLayers/Map.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/OpenLayers/Map.js b/lib/OpenLayers/Map.js index 62b5b2306d..621de8a0e4 100644 --- a/lib/OpenLayers/Map.js +++ b/lib/OpenLayers/Map.js @@ -395,6 +395,14 @@ OpenLayers.Map = OpenLayers.Class({ * the popup from getting too close to the map border. */ paddingForPopups : null, + + /** + * APIProperty: tileAnimation + * {Boolean} If set to true the olMapTileAnim class is assigned to the + * map div. This, with OpenLayers' default CSS, results in fade-in + * effects when image tiles are displayed. + */ + tileAnimation: true, /** * Property: minPx @@ -500,6 +508,9 @@ OpenLayers.Map = OpenLayers.Class({ } OpenLayers.Element.addClass(this.div, 'olMap'); + if (this.tileAnimation) { + OpenLayers.Element.addClass(this.div, 'olMapTileAnim'); + } // the viewPortDiv is the outermost div we modify var id = this.id + "_OpenLayers_ViewPort";