OpenLayers OpenLayers

Changeset 6461

Show
Ignore:
Timestamp:
03/07/08 17:49:39 (9 months ago)
Author:
euzuro
Message:

brinGinG up to date with trunk. 6402:HEAD

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sandbox/euzuro/pop/examples/animated_panning.html

    r6253 r6461  
    55    <style type="text/css"> 
    66        #map { 
     7            width: 512px; 
     8            height: 256px; 
     9            border: 1px solid black; 
     10        } 
     11        #map2 { 
    712            width: 512px; 
    813            height: 256px; 
     
    5156            click.activate(); 
    5257            map.addControl(new OpenLayers.Control.OverviewMap()); 
     58 
     59            map2 = new OpenLayers.Map('map2', {'panMethod': null} ); 
     60            layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",  
     61                "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); 
     62                 
     63            map2.addLayer(layer); 
     64            map2.zoomToMaxExtent(); 
    5365        } 
    5466 
     
    7789    <div id="map"></div> 
    7890    <div id="docs"> 
    79         This is an example of transition effects. If the new random center is in the current extent, the map will pan smoothly. <br /> 
     91        <p>This is an example of transition effects. If the new random center is in the current extent, the map will pan smoothly. <br /> 
    8092        The random selection will continue until you press it again. Additionally, you can single click in the map to pan smoothly 
    8193        to that area, or use the pan control to pan smoothly. 
    82  
     94        </p> 
    8395    </div> 
    8496    <button onclick="setCenterInterval()">Start/stop random recenter</button> 
     97     <div id="map2"></div> 
     98    <div>     
     99    <p>To turn off Animated Panning, create a map with an panMethod set to 
     100        null. </p> 
     101    </div> 
    85102  </body> 
    86103</html> 
  • sandbox/euzuro/pop/lib/OpenLayers/Ajax.js

    r6325 r6461  
    5454 * 
    5555 * Returns: 
    56  * {OpenLayers.Ajax.Request}  The request object.  To abort loading, call 
    57  *     request.transport.abort(); 
     56 * {XMLHttpRequest}  The request object.  To abort loading, call 
     57 *     request.abort(). 
    5858 */ 
    5959OpenLayers.loadURL = function(uri, params, caller, 
     
    6767 
    6868    // from prototype.js 
    69     return new OpenLayers.Ajax.Request( 
     69    var request = new OpenLayers.Ajax.Request( 
    7070        uri,  
    7171        { 
     
    7676        } 
    7777    ); 
     78    return request.transport; 
    7879}; 
    7980 
     
    547548 
    548549/** 
    549  * Class: OpenLayers.Ajax.Request 
    550  * 
    551  * Inherit: 
    552  *  - <OpenLayers.Ajax.Base> 
     550 * Class: OpenLayers.Ajax.Response 
    553551 */ 
    554552OpenLayers.Ajax.Response = OpenLayers.Class({ 
  • sandbox/euzuro/pop/lib/OpenLayers/BaseTypes/Bounds.js

    r6325 r6461  
    460460        var ll = OpenLayers.Projection.transform( 
    461461            {'x': this.left, 'y': this.bottom}, source, dest); 
     462        var lr = OpenLayers.Projection.transform( 
     463            {'x': this.right, 'y': this.bottom}, source, dest); 
     464        var ul = OpenLayers.Projection.transform( 
     465            {'x': this.left, 'y': this.top}, source, dest); 
    462466        var ur = OpenLayers.Projection.transform( 
    463467            {'x': this.right, 'y': this.top}, source, dest); 
    464         this.left   = ll.x
    465         this.bottom = ll.y
    466         this.right  = ur.x
    467         this.top    = ur.y
     468        this.left   = Math.min(ll.x, ul.x)
     469        this.bottom = Math.min(ll.y, lr.y)
     470        this.right  = Math.max(lr.x, ur.x)
     471        this.top    = Math.max(ul.y, ur.y)
    468472        return this; 
    469473    }, 
  • sandbox/euzuro/pop/lib/OpenLayers/Control.js

    r6253 r6461  
    105105    handler: null, 
    106106 
     107    /** 
     108     * APIProperty: eventListeners 
     109     * {Object} If set as an option at construction, the eventListeners 
     110     *     object will be registered with <OpenLayers.Events.on>.  Object 
     111     *     structure must be a listeners object as shown in the example for 
     112     *     the events.on method. 
     113     */ 
     114    eventListeners: null, 
     115 
    107116    /**  
    108117     * Property: events 
     
    156165         
    157166        this.events = new OpenLayers.Events(this, null, this.EVENT_TYPES); 
     167        if(this.eventListeners instanceof Object) { 
     168            this.events.on(this.eventListeners); 
     169        } 
    158170        this.id = OpenLayers.Util.createUniqueID(this.CLASS_NAME + "_"); 
    159171    }, 
     
    167179    destroy: function () { 
    168180        if(this.events) { 
     181            if(this.eventListeners) { 
     182                this.events.un(this.eventListeners); 
     183            } 
    169184            this.events.destroy(); 
    170185            this.events = null; 
    171186        } 
     187        this.eventListeners = null; 
     188 
    172189        // eliminate circular references 
    173190        if (this.handler) { 
     
    231248            this.position = px.clone(); 
    232249        } 
    233         this.moveTo(this.position);         
     250        this.moveTo(this.position); 
    234251        return this.div; 
    235252    }, 
  • sandbox/euzuro/pop/lib/OpenLayers/Control/ModifyFeature.js

    r6325 r6461  
    290290        this.dragControl.activate(); 
    291291        this.onModificationStart(this.feature); 
     292        this.layer.events.triggerEvent("beforefeaturemodified",  
     293                                       {feature: this.feature}); 
    292294    }, 
    293295 
     
    316318        this.dragControl.deactivate(); 
    317319        this.onModificationEnd(object.feature); 
     320        this.layer.events.triggerEvent("afterfeaturemodified",  
     321                                       {feature: object.feature}); 
    318322    }, 
    319323 
     
    429433        this.resetVertices(); 
    430434        this.onModification(this.feature); 
     435        this.layer.events.triggerEvent("featuremodified",  
     436                                       {feature: this.feature}); 
    431437    }, 
    432438     
     
    501507                this.resetVertices(); 
    502508                this.onModification(this.feature); 
     509                this.layer.events.triggerEvent("featuremodified",  
     510                                               {feature: this.feature}); 
    503511            } 
    504512        } 
  • sandbox/euzuro/pop/lib/OpenLayers/Control/Navigation.js

    r6127 r6461  
    130130     * Parameters: 
    131131     * evt - {Event} 
     132     * deltaZ - {Integer} 
    132133     */ 
    133134    wheelChange: function(evt, deltaZ) { 
  • sandbox/euzuro/pop/lib/OpenLayers/Control/NavigationHistory.js

    r6253 r6461  
    111111     * Property: restoring 
    112112     * {Boolean} Currently restoring a history state.  This is set to true 
    113      *     before callilng restore and set to false after restore returns. 
     113     *     before calling restore and set to false after restore returns. 
    114114     */ 
    115115    restoring: false, 
    116  
     116     
    117117    /** 
    118118     * Constructor: OpenLayers.Control.NavigationHistory  
     
    140140            displayClass: this.displayClass + "Previous" 
    141141        }; 
    142         if(options) { 
    143             OpenLayers.Util.extend(previousOptions, options.previousOptions); 
    144         } 
     142        OpenLayers.Util.extend(previousOptions, this.previousOptions); 
    145143        this.previous = new OpenLayers.Control.Button(previousOptions); 
    146144         
     
    149147            displayClass: this.displayClass + "Next" 
    150148        }; 
    151         if(options) { 
    152             OpenLayers.Util.extend(nextOptions, options.nextOptions); 
    153         } 
     149        OpenLayers.Util.extend(nextOptions, this.nextOptions); 
    154150        this.next = new OpenLayers.Control.Button(nextOptions); 
    155151 
  • sandbox/euzuro/pop/lib/OpenLayers/Control/Panel.js

    r6253 r6461  
    149149        } 
    150150        for (var i = 0; i < this.controls.length; i++) { 
    151             if (this.controls[i] == control) { 
    152                 control.activate(); 
    153             } else { 
     151            if (this.controls[i] != control) { 
    154152                if (this.controls[i].type != OpenLayers.Control.TYPE_TOGGLE) { 
    155153                    this.controls[i].deactivate(); 
     
    157155            } 
    158156        } 
     157        control.activate(); 
    159158    }, 
    160159 
  • sandbox/euzuro/pop/lib/OpenLayers/Control/ScaleLine.js

    r6253 r6461  
    55/** 
    66 * @requires OpenLayers/Control.js 
    7  * 
     7 */ 
     8 
     9/** 
    810 * Class: OpenLayers.Control.ScaleLine 
    911 * Display a small line indicator representing the current map scale on the map. 
  • sandbox/euzuro/pop/lib/OpenLayers/Control/ZoomBox.js

    r5796 r6461  
    5555                var zoomFactor = Math.min((this.map.size.h / pixHeight), 
    5656                    (this.map.size.w / pixWidth)); 
    57                 var extent = map.getExtent(); 
     57                var extent = this.map.getExtent(); 
    5858                var center = this.map.getLonLatFromPixel( 
    5959                    position.getCenterPixel()); 
  • sandbox/euzuro/pop/lib/OpenLayers/Events.js

    r6253 r6461  
    652652        evt.object = this.object; 
    653653        evt.element = this.element; 
     654        if(!evt.type) { 
     655            evt.type = type; 
     656        } 
    654657     
    655658        // execute all callbacks registered for specified type 
  • sandbox/euzuro/pop/lib/OpenLayers/Format/JSON.js

    r6136 r6461  
    287287         * Transform a string into a JSON string. 
    288288         * 
    289          * Parameters 
     289         * Parameters: 
    290290         * string - {String} The string to be serialized 
    291291         *  
  • sandbox/euzuro/pop/lib/OpenLayers/Geometry/Rectangle.js

    r5614 r6461  
    99/** 
    1010 * Class: OpenLayers.Geometry.Rectangle 
    11  * A Rectangle is a simple geometry. It is specified by a point (x and y)  
    12  *     and dimensions (width and height), all of which are directly accessible  
    13  *     as properties. 
     11 * This class is *not supported*, and probably isn't what you're looking for. 
     12 *     Instead, most users probably want something like: 
     13 *     (code) 
     14 *     var poly = new OpenLayers.Bounds(0,0,10,10).toGeometry(); 
     15 *     (end) 
     16 *     This will create a rectangular Polygon geometry.  
    1417 *  
    1518 * Inherits: 
  • sandbox/euzuro/pop/lib/OpenLayers/Handler/Click.js

    r6136 r6461  
    160160            } else { 
    161161                // set the timer, send evt only if single is true 
    162                 var clickEvent = this.single ? evt : null; 
     162                //use a clone of the event object because it will no longer  
     163                //be a valid event object in IE in the timer callback 
     164                var clickEvent = this.single ? 
     165                    OpenLayers.Util.extend({}, evt) : null; 
    163166                this.timerId = window.setTimeout( 
    164167                    OpenLayers.Function.bind(this.delayedCall, this, clickEvent), 
  • sandbox/euzuro/pop/lib/OpenLayers/Handler/Hover.js

    r6136 r6461  
    8787            this.callback('move', [evt]); 
    8888            this.px = evt.xy; 
     89            // clone the evt so original properties can be accessed even 
     90            // if the browser deletes them during the delay 
     91            evt = OpenLayers.Util.extend({}, evt); 
    8992            this.timerId = window.setTimeout( 
    9093                OpenLayers.Function.bind(this.delayedCall, this, evt), 
  • sandbox/euzuro/pop/lib/OpenLayers/Layer.js

    r6402 r6461  
    140140 
    141141    /** 
     142     * APIProperty: eventListeners 
     143     * {Object} If set as an option at construction, the eventListeners 
     144     *     object will be registered with <OpenLayers.Events.on>.  Object 
     145     *     structure must be a listeners object as shown in the example for 
     146     *     the events.on method. 
     147     */ 
     148    eventListeners: null, 
     149 
     150    /** 
    142151     * APIProperty: gutter 
    143152     * {Integer} Determines the width (in pixels) of the gutter around image 
     
    249258    wrapDateLine: false, 
    250259     
     260    /** 
     261     * APIProperty: transitionEffect 
     262     * {String} The transition effect to use when the map is panned or 
     263     *     zoomed.   
     264     * 
     265     * There are currently two supported values: 
     266     *  - *null* No transition effect (the default). 
     267     *  - *resize*  Existing tiles are resized on zoom to provide a visual 
     268     *    effect of the zoom having taken place immediately.  As the 
     269     *    new tiles become available, they are drawn over top of the 
     270     *    resized tiles. 
     271     */ 
     272    transitionEffect: null, 
     273     
     274    /** 
     275     * Property: SUPPORTED_TRANSITIONS 
     276     * {Array} An immutable (that means don't change it!) list of supported  
     277     *     transitionEffect values. 
     278     */ 
     279    SUPPORTED_TRANSITIONS: ['resize'], 
    251280     
    252281    /** 
     
    273302            this.events = new OpenLayers.Events(this, this.div,  
    274303                                                this.EVENT_TYPES); 
     304            if(this.eventListeners instanceof Object) { 
     305                this.events.on(this.eventListeners); 
     306            } 
     307 
    275308        } 
    276309 
     
    303336 
    304337        if (this.events) { 
     338            if(this.eventListeners) { 
     339                this.events.un(this.eventListeners); 
     340            } 
    305341            this.events.destroy(); 
    306342        } 
     343        this.eventListeners = null; 
    307344        this.events = null; 
    308345    }, 
  • sandbox/euzuro/pop/lib/OpenLayers/Layer/Google.js

    r6325 r6461  
    8181     *  
    8282     * Parameters: 
    83      * name - {String} 
    84      * options - {Object} 
     83     * name - {String} A name for the layer. 
     84     * options - {Object} An optional object whose properties will be set 
     85     *     on the layer. 
    8586     */ 
    8687    initialize: function(name, options) { 
  • sandbox/euzuro/pop/lib/OpenLayers/Layer/Grid.js

    r6253 r6461  
    511511     * Parameters 
    512512     * bounds - {<OpenLayers.Bounds>} 
     513     * position - {<OpenLayers.Pixel>} 
    513514     * 
    514515     * Returns: 
     
    695696    /** 
    696697     * Method: onMapResize 
    697      * For singleTile layers, this will replace the tile with the 
    698      * a new one with updated tileSize and extent
     698     * For singleTile layers, this will set a new tile size according to the 
     699     * dimensions of the map pane
    699700     */ 
    700701    onMapResize: function() { 
    701702        if (this.singleTile) { 
    702             this.clearGrid(); 
    703703            this.setTileSize(); 
    704704        } 
  • sandbox/euzuro/pop/lib/OpenLayers/Layer/MapGuide.js

    r6402 r6461  
    66 * @requires OpenLayers/Ajax.js 
    77 * @requires OpenLayers/Layer/Grid.js 
    8  * 
     8 */ 
     9 
     10/** 
    911 * Class: OpenLayers.Layer.MapGuide 
    1012 * Instances of OpenLayers.Layer.MapGuide are used to display 
     
    4850        format: 'PNG', 
    4951        locale: 'en', 
     52        clip: '1', 
    5053        version: '1.0.0' 
    5154    }, 
     
    150153     * Parameters: 
    151154     * bounds - {<OpenLayers.Bounds>} 
     155     * position - {<OpenLayers.Pixel>} 
    152156     *  
    153157     * Returns: 
  • sandbox/euzuro/pop/lib/OpenLayers/Layer/MapServer.js

    r5622 r6461  
    8686     * Parameters: 
    8787     * bounds - {<OpenLayers.Bounds>} 
     88     * position - {<OpenLayers.Pixel>} 
    8889     *  
    8990     * Returns: 
  • sandbox/euzuro/pop/lib/OpenLayers/Layer/PointTrack.js

    r5733 r6461  
    55/** 
    66 * @requires OpenLayers/Layer/Vector.js 
    7  *  
     7 */ 
     8 
     9/** 
    810 * Class: OpenLayers.Layer.PointTrack 
    911 * Vector layer to display ordered point features as a line, creating one 
  • sandbox/euzuro/pop/lib/OpenLayers/Layer/TMS.js

    r5950 r6461  
    113113     * Parameters: 
    114114     * bounds - {<OpenLayers.Bounds>} 
     115     * position - {<OpenLayers.Pixel>} 
    115116     *  
    116117     * Returns: 
  • sandbox/euzuro/pop/lib/OpenLayers/Layer/Text.js

    r5828 r6461  
    174174            if (feature.style.graphicXOffset  
    175175                && feature.style.graphicYOffset) { 
    176                 iconOffset = new OpenLayers.Size
     176                iconOffset = new OpenLayers.Pixel
    177177                    feature.style.graphicXOffset,  
    178178                    feature.style.graphicYOffset); 
  • sandbox/euzuro/pop/lib/OpenLayers/Layer/TileCache.js

    r6136 r6461  
    148148     * Parameters:  
    149149     * bounds - {<OpenLayers.Bounds>}  
     150     * position - {<OpenLayers.Pixel>} 
    150151     * 
    151152     * Returns: 
  • sandbox/euzuro/pop/lib/OpenLayers/Layer/Vector.js

    r6402 r6461  
    5252     *      Listeners will receive an object with a *feature* property 
    5353     *      referencing the unselected feature. 
     54     *  - *beforefeaturemodified* Triggered when a feature is selected to  
     55     *      be modified.  Listeners will receive an object with a *feature*  
     56     *      property referencing the selected feature. 
     57     *  - *featuremodified* Triggered when a feature has been modified. 
     58     *      Listeners will receive an object with a *feature* property referencing  
     59     *      the modified feature. 
     60     *  - *afterfeaturemodified* Triggered when a feature is finished being modified. 
     61     *      Listeners will receive an object with a *feature* property referencing  
     62     *      the modified feature. 
    5463     */ 
    5564    EVENT_TYPES: ["beforefeatureadded", "featureadded", 
    56                   "featuresadded", "featureselected", "featureunselected"], 
     65                  "featuresadded", "featureselected", "featureunselected",  
     66                  "beforefeaturemodified", "featuremodified", "afterfeaturemodified"], 
    5767 
    5868    /** 
  • sandbox/euzuro/pop/lib/OpenLayers/Layer/WFS.js

    r6325 r6461  
    278278            var params = {BBOX: this.encodeBBOX ? tileBounds.toBBOX()  
    279279                                                : tileBounds.toArray()}; 
     280             
     281            if (this.map && !this.projection.equals(this.map.getProjectionObject())) { 
     282                var projectedBounds = tileBounds.clone(); 
     283                projectedBounds.transform(this.map.getProjectionObject(),  
     284                                          this.projection); 
     285                params.BBOX = this.encodeBBOX ? projectedBounds.toBBOX()  
     286                                              : projectedBounds.toArray(); 
     287            }                                   
     288 
    280289            url += "&" + OpenLayers.Util.getParameterString(params); 
    281290 
     
    435444    commit: function() { 
    436445        if (!this.writer) { 
    437             this.writer = new OpenLayers.Format.WFS({},this); 
     446            var options = {}; 
     447            if (this.map && !this.projection.equals(this.map.getProjectionObject())) { 
     448                options.externalProjection = this.projection; 
     449                options.internalProjection = this.map.getProjectionObject(); 
     450            }     
     451             
     452            this.writer = new OpenLayers.Format.WFS(options,this); 
    438453        } 
    439454 
  • sandbox/euzuro/pop/lib/OpenLayers/Layer/WMS.js

    r6253 r6461  
    172172     * Parameters: 
    173173     * bounds - {<OpenLayers.Bounds>} 
     174     * position - {<OpenLayers.Pixel>} 
    174175     *  
    175176     * Returns: 
  • sandbox/euzuro/pop/lib/OpenLayers/Layer/WorldWind.js

    r5614 r6461  
    6565    /** 
    6666     * Method: addTile 
     67     *  
     68     * Parameters: 
     69     * bounds - {<OpenLayers.Bounds>} 
     70     * position - {<OpenLayers.Pixel>} 
     71     *  
     72     * Returns: 
     73     * {<OpenLayers.Tile.Image>} The added OpenLayers.Tile.Image 
    6774     */ 
    6875    addTile:function(bounds,position) { 
  • sandbox/euzuro/pop/lib/OpenLayers/Map.js

    r6402 r6461  
    9595     *     to be set to a value between one of the values in the resolutions 
    9696     *     array.  Default is false. 
     97     * 
     98     * When fractionalZoom is set to true, it is possible to zoom to 
     99     *     an arbitrary extent.  This requires a base layer from a source 
     100     *     that supports requests for arbitrary extents (i.e. not cached 
     101     *     tiles on a regular lattice).  This means that fractionalZoom 
     102     *     will not work with commercial layers (Google, Yahoo, VE), layers 
     103     *     using TileCache, or any other pre-cached data sources. 
     104     * 
     105     * If you are using fractionalZoom, then you should also use 
     106     *     <getResolutionForZoom> instead of layer.resolutions[zoom] as the 
     107     *     former works for non-integer zoom levels. 
    97108     */ 
    98109    fractionalZoom: false, 
     
    326337    panTween: null, 
    327338 
     339    /** 
     340     * APIProperty: eventListeners 
     341     * {Object} If set as an option at construction, the eventListeners 
     342     *     object will be registered with <OpenLayers.Events.on>.  Object 
     343     *     structure must be a listeners object as shown in the example for 
     344     *     the events.on method. 
     345     */ 
     346    eventListeners: null, 
     347 
     348    /** 
     349     * Property: panMethod 
     350     * {Function} The Easing function to be used for tweening.  Default is 
     351     * OpenLayers.Easing.Expo.easeOut. Setting this to 'null' turns off 
     352     * animated panning. 
     353     */ 
     354    panMethod: OpenLayers.Easing.Expo.easeOut, 
     355     
    328356    /** 
    329357     * Constructor: OpenLayers.Map 
     
    390418                                            this.fallThrough); 
    391419        this.updateSize(); 
     420        if(this.eventListeners instanceof Object) { 
     421            this.events.on(this.eventListeners); 
     422        } 
    392423  
    393424        // update the map size and location before the map moves 
     
    515546        this.viewPortDiv = null; 
    516547 
     548        if(this.eventListeners) { 
     549            this.events.un(this.eventListeners); 
     550            this.eventListeners = null; 
     551        } 
    517552        this.events.destroy(); 
    518553        this.events = null; 
     
    13181353     */ 
    13191354    panTo: function(lonlat) { 
    1320         if (this.getExtent().containsLonLat(lonlat)) { 
     1355        if (this.panMethod && this.getExtent().containsLonLat(lonlat)) { 
    13211356            if (!this.panTween) { 
    1322                 this.panTween = new OpenLayers.Tween(OpenLayers.Easing.Expo.easeOut); 
     1357                this.panTween = new OpenLayers.Tween(this.panMethod); 
    13231358            } 
    13241359            var center = this.getCenter(); 
     
    13371372                    }, this), 
    13381373                    eachStep: OpenLayers.Function.bind(function(lonlat) { 
    1339                         var lonlat = new OpenLayers.LonLat(lonlat.lon, lonlat.lat); 
     1374                        lonlat = new OpenLayers.LonLat(lonlat.lon, lonlat.lat); 
    13401375                        this.moveTo(lonlat, this.zoom, { 
    13411376                            'dragging': true, 
     
    13441379                    }, this), 
    13451380                    done: OpenLayers.Function.bind(function(lonlat) { 
    1346                         var lonlat = new OpenLayers.LonLat(lonlat.lon, lonlat.lat); 
     1381                        lonlat = new OpenLayers.LonLat(lonlat.lon, lonlat.lat); 
    13471382                        this.moveTo(lonlat, this.zoom, { 
    13481383                            'noEvent': true 
  • sandbox/euzuro/pop/lib/OpenLayers/Popup.js

    r6405 r6461  
    391391    * Method: setBackgroundColor 
    392392    * Sets the background color of the popup. 
     393    * 
    393394    * Parameters: 
    394395    * color - {String} the background color.  eg "#FFBBBB" 
  • sandbox/euzuro/pop/lib/OpenLayers/Tile.js

    r6325 r6461  
    8181    isLoading: false, 
    8282     
     83    /** 
     84     * Property: isBackBuffer 
     85     * {Boolean} Is this tile a back buffer tile? 
     86     */ 
     87    isBackBuffer: false, 
     88     
     89    /** 
     90     * Property: lastRatio 
     91     * {Float} Used in transition code only.  This is the previous ratio 
     92     *     of the back buffer tile resolution to the map resolution.  Compared 
     93     *     with the current ratio to determine if zooming occurred. 
     94     */ 
     95    lastRatio: 1, 
     96 
     97    /** 
     98     * Property: isFirstDraw 
     99     * {Boolean} Is this the first time the tile is being drawn? 
     100     *     This is used to force resetBackBuffer to synchronize 
     101     *     the backBufferTile with the foreground tile the first time 
     102     *     the foreground tile loads so that if the user zooms 
     103     *     before the layer has fully loaded, the backBufferTile for 
     104     *     tiles that have been loaded can be used. 
     105     */ 
     106    isFirstDraw: true, 
     107         
     108    /** 
     109     * Property: backBufferTile 
     110     * {<OpenLayers.Tile>} A clone of the tile used to create transition 
     111     *     effects when the tile is moved or changes resolution. 
     112     */ 
     113    backBufferTile: null, 
     114         
    83115    /** TBD 3.0 -- remove 'url' from the list of parameters to the constructor. 
    84116     *             there is no need for the base tile class to have a url. 
     
    112144     */ 
    113145    destroy:function() { 
     146        if (OpenLayers.Util.indexOf(this.layer.SUPPORTED_TRANSITIONS,  
     147                this.layer.transitionEffect) != -1) { 
     148            this.layer.events.unregister("loadend", this, this.resetBackBuffer); 
     149            this.events.unregister('loadend', this, this.resetBackBuffer);             
     150        } else { 
     151            this.events.unregister('loadend', this, this.showTile); 
     152        } 
    114153        this.layer  = null; 
    115154        this.bounds = null; 
     
    119158        this.events.destroy(); 
    120159        this.events = null; 
     160         
     161        /* clean up the backBufferTile if it exists */ 
     162        if (this.backBufferTile) { 
     163            this.backBufferTile.destroy(); 
     164            this.backBufferTile = null; 
     165        } 
    121166    }, 
    122167     
     
    157202     */ 
    158203    draw: function() { 
    159          
    160         //clear tile's contents and mark as not drawn 
    161         this.clear(); 
    162          
    163204        var maxExtent = this.layer.maxExtent; 
    164205        var withinMaxExtent = (maxExtent && 
     
    167208        // The only case where we *wouldn't* want to draw the tile is if the  
    168209        // tile is outside its layer's maxExtent. 
    169         return (withinMaxExtent || this.layer.displayOutsideMaxExtent); 
     210        var drawTile = (withinMaxExtent || this.layer.displayOutsideMaxExtent); 
     211 
     212        if (OpenLayers.Util.indexOf(this.layer.SUPPORTED_TRANSITIONS, this.layer.transitionEffect) != -1) { 
     213            if (drawTile) { 
     214                //we use a clone of this tile to create a double buffer for visual 
     215                //continuity.  The backBufferTile is used to create transition 
     216                //effects while the tile in the grid is repositioned and redrawn 
     217                if (!this.backBufferTile) { 
     218                    this.backBufferTile = this.clone(); 
     219      &n