OpenLayers OpenLayers

Changeset 1586

Show
Ignore:
Timestamp:
10/05/06 10:09:48 (2 years ago)
Author:
sderle
Message:

Moved Object.extend to OpenLayers.Util.extend.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sandbox/crschmidt/noprototype/lib/OpenLayers/Ajax.js

    r1571 r1586  
    160160      parameters:   '' 
    161161    } 
    162     Object.extend(this.options, options || {}); 
     162    OpenLayers.Util.extend(this.options, options || {}); 
    163163  }, 
    164164 
     
    178178  ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete']; 
    179179 
    180 OpenLayers.Ajax.Request.prototype = Object.extend(new OpenLayers.Ajax.Base(), { 
     180OpenLayers.Ajax.Request.prototype = OpenLayers.Util.extend(new OpenLayers.Ajax.Base(), { 
    181181  initialize: function(url, options) { 
    182182    this.transport = OpenLayers.Ajax.getTransport(); 
  • sandbox/crschmidt/noprototype/lib/OpenLayers/Control.js

    r1570 r1586  
    3131     */ 
    3232    initialize: function (options) { 
    33         Object.extend(this, options); 
     33        OpenLayers.Util.extend(this, options); 
    3434         
    3535        this.id = OpenLayers.Util.createUniqueID(this.CLASS_NAME + "_"); 
  • sandbox/crschmidt/noprototype/lib/OpenLayers/Control/KeyboardDefaults.js

    r1570 r1586  
    1010OpenLayers.Control.KeyboardDefaults = OpenLayers.Class.create(); 
    1111OpenLayers.Control.KeyboardDefaults.prototype =  
    12   Object.extend( new OpenLayers.Control(), { 
     12  OpenLayers.Util.extend( new OpenLayers.Control(), { 
    1313 
    1414    /** @type int */ 
  • sandbox/crschmidt/noprototype/lib/OpenLayers/Control/LayerSwitcher.js

    r1570 r1586  
    1010OpenLayers.Control.LayerSwitcher = OpenLayers.Class.create(); 
    1111OpenLayers.Control.LayerSwitcher.prototype =  
    12   Object.extend( new OpenLayers.Control(), { 
     12  OpenLayers.Util.extend( new OpenLayers.Control(), { 
    1313 
    1414    /** @type String */ 
  • sandbox/crschmidt/noprototype/lib/OpenLayers/Control/MouseDefaults.js

    r1570 r1586  
    1010OpenLayers.Control.MouseDefaults = OpenLayers.Class.create(); 
    1111OpenLayers.Control.MouseDefaults.prototype =  
    12   Object.extend( new OpenLayers.Control(), { 
     12  OpenLayers.Util.extend( new OpenLayers.Control(), { 
    1313 
    1414    /** @type Boolean */ 
  • sandbox/crschmidt/noprototype/lib/OpenLayers/Control/MouseToolbar.js

    r1570 r1586  
    1313OpenLayers.Control.MouseToolbar.Y = 300; 
    1414OpenLayers.Control.MouseToolbar.prototype =  
    15   Object.extend( new OpenLayers.Control(),  
    16     Object.extend( new OpenLayers.Control.MouseDefaults(), { 
     15  OpenLayers.Util.extend( new OpenLayers.Control(),  
     16    OpenLayers.Util.extend( new OpenLayers.Control.MouseDefaults(), { 
    1717     
    1818    mode: null, 
  • sandbox/crschmidt/noprototype/lib/OpenLayers/Control/PanZoom.js

    r1570 r1586  
    1212OpenLayers.Control.PanZoom.Y = 4; 
    1313OpenLayers.Control.PanZoom.prototype =  
    14   Object.extend( new OpenLayers.Control(), { 
     14  OpenLayers.Util.extend( new OpenLayers.Control(), { 
    1515 
    1616    /** @type int */ 
  • sandbox/crschmidt/noprototype/lib/OpenLayers/Control/PanZoomBar.js

    r1574 r1586  
    1212OpenLayers.Control.PanZoomBar.Y = 4; 
    1313OpenLayers.Control.PanZoomBar.prototype =  
    14   Object.extend( new OpenLayers.Control.PanZoom(), { 
     14  OpenLayers.Util.extend( new OpenLayers.Control.PanZoom(), { 
    1515 
    1616    /** @type Array(...) */ 
  • sandbox/crschmidt/noprototype/lib/OpenLayers/Control/Permalink.js

    r1570 r1586  
    1010OpenLayers.Control.Permalink = OpenLayers.Class.create(); 
    1111OpenLayers.Control.Permalink.prototype =  
    12   Object.extend( new OpenLayers.Control(), { 
     12  OpenLayers.Util.extend( new OpenLayers.Control(), { 
    1313 
    1414    /** @type DOMElement */ 
  • sandbox/crschmidt/noprototype/lib/OpenLayers/Control/Scale.js

    r1570 r1586  
    1010OpenLayers.Control.Scale = OpenLayers.Class.create(); 
    1111OpenLayers.Control.Scale.prototype =  
    12   Object.extend( new OpenLayers.Control(), { 
     12  OpenLayers.Util.extend( new OpenLayers.Control(), { 
    1313    /** @type DOMElement */ 
    1414    element: null, 
  • sandbox/crschmidt/noprototype/lib/OpenLayers/Feature/WFS.js

    r1570 r1586  
    1010OpenLayers.Feature.WFS = OpenLayers.Class.create(); 
    1111OpenLayers.Feature.WFS.prototype =  
    12   Object.extend( new OpenLayers.Feature(), { 
     12  OpenLayers.Util.extend( new OpenLayers.Feature(), { 
    1313       
    1414    /**  
  • sandbox/crschmidt/noprototype/lib/OpenLayers/Layer.js

    r1570 r1586  
    9494 
    9595            //store a copy of the custom options for later cloning 
    96             this.options = Object.extend(new Object(), options); 
     96            this.options = OpenLayers.Util.extend(new Object(), options); 
    9797             
    9898            //add options to layer 
    99             Object.extend(this, this.options); 
     99            OpenLayers.Util.extend(this, this.options); 
    100100 
    101101            this.name = name; 
     
    161161         
    162162        // update our copy for clone 
    163         Object.extend(this.options, newOptions); 
     163        OpenLayers.Util.extend(this.options, newOptions); 
    164164 
    165165        // add new options to this 
    166         Object.extend(this, this.options); 
     166        OpenLayers.Util.extend(this, this.options); 
    167167    }, 
    168168     
  • sandbox/crschmidt/noprototype/lib/OpenLayers/Layer/Boxes.js

    r1570 r1586  
    1111OpenLayers.Layer.Boxes = OpenLayers.Class.create(); 
    1212OpenLayers.Layer.Boxes.prototype =  
    13     Object.extend( new OpenLayers.Layer.Markers(), { 
     13    OpenLayers.Util.extend( new OpenLayers.Layer.Markers(), { 
    1414 
    1515    initialize: function () { 
  • sandbox/crschmidt/noprototype/lib/OpenLayers/Layer/Canvas.js

    r1570 r1586  
    1010OpenLayers.Layer.Canvas = OpenLayers.Class.create(); 
    1111OpenLayers.Layer.Canvas.prototype =  
    12   Object.extend( new OpenLayers.Layer(), { 
     12  OpenLayers.Util.extend( new OpenLayers.Layer(), { 
    1313     
    1414    /** Canvas layer is never a base layer.  
  • sandbox/crschmidt/noprototype/lib/OpenLayers/Layer/EventPane.js

    r1570 r1586  
    1111OpenLayers.Layer.EventPane = OpenLayers.Class.create(); 
    1212OpenLayers.Layer.EventPane.prototype =  
    13   Object.extend(new OpenLayers.Layer, { 
     13  OpenLayers.Util.extend(new OpenLayers.Layer, { 
    1414 
    1515    /** EventPaned layers are always base layers, by necessity. 
  • sandbox/crschmidt/noprototype/lib/OpenLayers/Layer/GeoRSS.js

    r1570 r1586  
    1010OpenLayers.Layer.GeoRSS = OpenLayers.Class.create(); 
    1111OpenLayers.Layer.GeoRSS.prototype =  
    12   Object.extend( new OpenLayers.Layer.Markers(), { 
     12  OpenLayers.Util.extend( new OpenLayers.Layer.Markers(), { 
    1313 
    1414    /** store url of text file 
  • sandbox/crschmidt/noprototype/lib/OpenLayers/Layer/Google.js

    r1570 r1586  
    1313OpenLayers.Layer.Google = OpenLayers.Class.create(); 
    1414OpenLayers.Layer.Google.prototype = 
    15   Object.extend( new OpenLayers.Layer.EventPane(),  
    16     Object.extend( new OpenLayers.Layer.FixedZoomLevels(), { 
     15  OpenLayers.Util.extend( new OpenLayers.Layer.EventPane(),  
     16    OpenLayers.Util.extend( new OpenLayers.Layer.FixedZoomLevels(), { 
    1717     
    1818    /** @type Boolean */ 
  • sandbox/crschmidt/noprototype/lib/OpenLayers/Layer/Grid.js

    r1570 r1586  
    1010OpenLayers.Layer.Grid = OpenLayers.Class.create(); 
    1111OpenLayers.Layer.Grid.prototype =  
    12   Object.extend( new OpenLayers.Layer.HTTPRequest(), { 
     12  OpenLayers.Util.extend( new OpenLayers.Layer.HTTPRequest(), { 
    1313     
    1414    /** @type OpenLayers.Size */ 
  • sandbox/crschmidt/noprototype/lib/OpenLayers/Layer/HTTPRequest.js

    r1570 r1586  
    1010OpenLayers.Layer.HTTPRequest = OpenLayers.Class.create(); 
    1111OpenLayers.Layer.HTTPRequest.prototype =  
    12   Object.extend( new OpenLayers.Layer(), { 
     12  OpenLayers.Util.extend( new OpenLayers.Layer(), { 
    1313 
    1414    /** @type String */ 
     
    3434        OpenLayers.Layer.prototype.initialize.apply(this, newArguments); 
    3535        this.url = url; 
    36         this.params = Object.extend( new Object(), params); 
     36        this.params = OpenLayers.Util.extend( new Object(), params); 
    3737    }, 
    3838 
     
    8080     */ 
    8181    mergeNewParams:function(newParams) { 
    82         this.params = Object.extend(this.params, newParams); 
     82        this.params = OpenLayers.Util.extend(this.params, newParams); 
    8383    }, 
    8484     
     
    107107        // create a new params hashtable with all the layer params and the  
    108108        // new params together. then convert to string 
    109         var allParams = Object.extend(new Object(), this.params); 
    110         var allParams = Object.extend(allParams, newParams); 
     109        var allParams = OpenLayers.Util.extend(new Object(), this.params); 
     110        var allParams = OpenLayers.Util.extend(allParams, newParams); 
    111111        var paramsString = OpenLayers.Util.getParameterString(allParams); 
    112112 
  • sandbox/crschmidt/noprototype/lib/OpenLayers/Layer/KaMap.js

    r1570 r1586  
    1010OpenLayers.Layer.KaMap = OpenLayers.Class.create(); 
    1111OpenLayers.Layer.KaMap.prototype =  
    12   Object.extend( new OpenLayers.Layer.Grid(), { 
     12  OpenLayers.Util.extend( new OpenLayers.Layer.Grid(), { 
    1313 
    1414    /** KaMap Layer is always a base layer  
  • sandbox/crschmidt/noprototype/lib/OpenLayers/Layer/MapServer.js

    r1570 r1586  
    88OpenLayers.Layer.MapServer = OpenLayers.Class.create(); 
    99OpenLayers.Layer.MapServer.prototype = 
    10   Object.extend( new OpenLayers.Layer.Grid(), { 
     10  OpenLayers.Util.extend( new OpenLayers.Layer.Grid(), { 
    1111 
    1212    /** @final @type hash */ 
     
    5858    clone: function (name, params) { 
    5959        var mergedParams = {}; 
    60         Object.extend(mergedParams, this.params); 
    61         Object.extend(mergedParams, params); 
     60        OpenLayers.Util.extend(mergedParams, this.params); 
     61        OpenLayers.Util.extend(mergedParams, params); 
    6262        var obj = new OpenLayers.Layer.MapServer(name, this.url, mergedParams); 
    6363        obj.setTileSize(this.tileSize); 
  • sandbox/crschmidt/noprototype/lib/OpenLayers/Layer/Markers.js

    r1570 r1586  
    1010OpenLayers.Layer.Markers = OpenLayers.Class.create(); 
    1111OpenLayers.Layer.Markers.prototype =  
    12   Object.extend( new OpenLayers.Layer(), { 
     12  OpenLayers.Util.extend( new OpenLayers.Layer(), { 
    1313     
    1414    /** Markers layer is never a base layer.  
  • sandbox/crschmidt/noprototype/lib/OpenLayers/Layer/MultiMap.js

    r1570 r1586  
    1010OpenLayers.Layer.MultiMap = OpenLayers.Class.create(); 
    1111OpenLayers.Layer.MultiMap.prototype =  
    12   Object.extend( new OpenLayers.Layer.EventPane(), { 
     12  OpenLayers.Util.extend( new OpenLayers.Layer.EventPane(), { 
    1313 
    1414    /** @type MMMap */ 
  • sandbox/crschmidt/noprototype/lib/OpenLayers/Layer/Text.js

    r1570 r1586  
    1010OpenLayers.Layer.Text = OpenLayers.Class.create(); 
    1111OpenLayers.Layer.Text.prototype =  
    12   Object.extend( new OpenLayers.Layer.Markers(), { 
     12  OpenLayers.Util.extend( new OpenLayers.Layer.Markers(), { 
    1313 
    1414    /** store url of text file - this should be specified in the  
  • sandbox/crschmidt/noprototype/lib/OpenLayers/Layer/VirtualEarth.js

    r1570 r1586  
    1010OpenLayers.Layer.VirtualEarth = OpenLayers.Class.create(); 
    1111OpenLayers.Layer.VirtualEarth.prototype =  
    12   Object.extend( new OpenLayers.Layer.EventPane(),  
    13     Object.extend( new OpenLayers.Layer.FixedZoomLevels(), { 
     12  OpenLayers.Util.extend( new OpenLayers.Layer.EventPane(),  
     13    OpenLayers.Util.extend( new OpenLayers.Layer.FixedZoomLevels(), { 
    1414         
    1515    /** @type VEMap */ 
  • sandbox/crschmidt/noprototype/lib/OpenLayers/Layer/WFS.js

    r1570 r1586  
    1111OpenLayers.Layer.WFS = OpenLayers.Class.create(); 
    1212OpenLayers.Layer.WFS.prototype =  
    13   Object.extend(new OpenLayers.Layer.Grid(), 
    14     Object.extend(new OpenLayers.Layer.Markers(), { 
     13  OpenLayers.Util.extend(new OpenLayers.Layer.Grid(), 
     14    OpenLayers.Util.extend(new OpenLayers.Layer.Markers(), { 
    1515 
    1616    /** WFS layer is never a base layer.  
  • sandbox/crschmidt/noprototype/lib/OpenLayers/Layer/WMS.js

    r1570 r1586  
    1010OpenLayers.Layer.WMS = OpenLayers.Class.create(); 
    1111OpenLayers.Layer.WMS.prototype =  
    12   Object.extend( new OpenLayers.Layer.Grid(), { 
     12  OpenLayers.Util.extend( new OpenLayers.Layer.Grid(), { 
    1313 
    1414    /** Hashtable of default parameter key/value pairs  
  • sandbox/crschmidt/noprototype/lib/OpenLayers/Layer/WMS/Untiled.js

    r1570 r1586  
    1111OpenLayers.Layer.WMS.Untiled = OpenLayers.Class.create(); 
    1212OpenLayers.Layer.WMS.Untiled.prototype =  
    13   Object.extend( new OpenLayers.Layer.HTTPRequest(), { 
     13  OpenLayers.Util.extend( new OpenLayers.Layer.HTTPRequest(), { 
    1414 
    1515    /** Hashtable of default parameter key/value pairs 
  • sandbox/crschmidt/noprototype/lib/OpenLayers/Layer/WorldWind.js

    r1570 r1586  
    1010OpenLayers.Layer.WorldWind = OpenLayers.Class.create(); 
    1111OpenLayers.Layer.WorldWind.prototype =  
    12   Object.extend( new OpenLayers.Layer.Grid(), { 
     12  OpenLayers.Util.extend( new OpenLayers.Layer.Grid(), { 
    1313     
    1414    DEFAULT_PARAMS: { 
  • sandbox/crschmidt/noprototype/lib/OpenLayers/Layer/Yahoo.js

    r1570 r1586  
    1010OpenLayers.Layer.Yahoo = OpenLayers.Class.create(); 
    1111OpenLayers.Layer.Yahoo.prototype =  
    12   Object.extend( new OpenLayers.Layer.EventPane(), { 
     12  OpenLayers.Util.extend( new OpenLayers.Layer.EventPane(), { 
    1313 
    1414    /** @type YMap */ 
  • sandbox/crschmidt/noprototype/lib/OpenLayers/Map.js

    r1573 r1586  
    214214        // now add the options declared by the user 
    215215        //  (these will override defaults) 
    216         Object.extend(this, options); 
     216        OpenLayers.Util.extend(this, options); 
    217217    }, 
    218218 
  • sandbox/crschmidt/noprototype/lib/OpenLayers/Marker/Box.js

    r1570 r1586  
    99 */ 
    1010OpenLayers.Marker.Box = OpenLayers.Class.create(); 
    11 OpenLayers.Marker.Box.prototype = Object.extend( new OpenLayers.Marker(), { 
     11OpenLayers.Marker.Box.prototype = OpenLayers.Util.extend( new OpenLayers.Marker(), { 
    1212    /** @type OpenLayers.LonLat */ 
    1313    bounds: null, 
  • sandbox/crschmidt/noprototype/lib/OpenLayers/Popup/Anchored.js

    r1570 r1586  
    1010OpenLayers.Popup.Anchored = OpenLayers.Class.create(); 
    1111OpenLayers.Popup.Anchored.prototype = 
    12    Object.extend( new OpenLayers.Popup(), { 
     12   OpenLayers.Util.extend( new OpenLayers.Popup(), { 
    1313 
    1414    /** "lr", "ll", "tr", "tl" - relative position of the popup. 
  • sandbox/crschmidt/noprototype/lib/OpenLayers/Popup/AnchoredBubble.js

    r1570 r1586  
    1414 
    1515OpenLayers.Popup.AnchoredBubble.prototype = 
    16    Object.extend( new OpenLayers.Popup.Anchored(), { 
     16   OpenLayers.Util.extend( new OpenLayers.Popup.Anchored(), { 
    1717 
    1818    /** @type DOMElement */ 
  • sandbox/crschmidt/noprototype/lib/OpenLayers/Prototype.js

    r1574 r1586  
    1111var Prototype = {Version: '1.4.0-OpenLayers', emptyFunction: function() {}}; 
    1212 
    13 Object.extend = function(destination, source) { 
    14     for (property in source) { 
    15       destination[property] = source[property]; 
    16     } 
    17     return destination; 
    18   }; 
    19 /*--------------------------------------------------------------------------*/ 
    20 /*--------------------------------------------------------------------------*/ 
    21  
    2213if (!window.Event) { 
    2314  var Event = new Object(); 
    2415} 
    2516 
    26 Object.extend(Event, { 
     17OpenLayers.Util.extend(Event, { 
    2718  KEY_BACKSPACE: 8, 
    2819  KEY_TAB:       9, 
  • sandbox/crschmidt/noprototype/lib/OpenLayers/Tile/Image.js

    r1570 r1586  
    1010OpenLayers.Tile.Image = OpenLayers.Class.create(); 
    1111OpenLayers.Tile.Image.prototype =  
    12   Object.extend( new OpenLayers.Tile(), { 
     12  OpenLayers.Util.extend( new OpenLayers.Tile(), { 
    1313     
    1414    /** @type DOMElement img */ 
  • sandbox/crschmidt/noprototype/lib/OpenLayers/Tile/WFS.js

    r1570 r1586  
    1010OpenLayers.Tile.WFS = OpenLayers.Class.create(); 
    1111OpenLayers.Tile.WFS.prototype =  
    12   Object.extend( new OpenLayers.Tile(), { 
     12  OpenLayers.Util.extend( new OpenLayers.Tile(), { 
    1313 
    1414    /** @type Array(OpenLayers.Feature)*/  
  • sandbox/crschmidt/noprototype/lib/OpenLayers/Util.js

    r1574 r1586  
    2727    } 
    2828}  
     29 
     30/* from Prototype.js */ 
     31OpenLayers.Util.extend = function(destination, source) { 
     32    for (property in source) { 
     33      destination[property] = source[property]; 
     34    } 
     35    return destination; 
     36}; 
    2937 
    3038/** 
     
    296304 
    297305/** Takes a hashtable and copies any keys that don't exist from 
    298 *   another hashtable, by analogy with Object.extend() from 
     306*   another hashtable, by analogy with OpenLayers.Util.extend() from 
    299307*   Prototype.js. 
    300308* 
  • sandbox/crschmidt/noprototype/lib/Rico/Corner.js

    r1424 r1586  
    189189         compact : false 
    190190      } 
    191       Object.extend(this.options, options || {}); 
     191      OpenLayers.Util.extend(this.options, options || {}); 
    192192 
    193193      this.options.numSlices = this.options.compact ? 2 : 4; 
  • sandbox/crschmidt/noprototype/tests/test_Layer_WMS.html

    r1552 r1586  
    100100        t.ok( layer.isBaseLayer, "baselayer is true by default"); 
    101101 
    102         var newParams = Object.extend(new Object(), params); 
     102        var newParams = OpenLayers.Util.extend(new Object(), params); 
    103103        newParams.transparent = "true"; 
    104104        layer = new OpenLayers.Layer.WMS(name, url, newParams);