Changeset 1651
- Timestamp:
- 10/06/06 11:57:33 (2 years ago)
- Files:
-
- trunk/openlayers/lib/OpenLayers/Ajax.js (modified) (1 diff)
- trunk/openlayers/lib/OpenLayers/Control/ArgParser.js (modified) (1 diff)
- trunk/openlayers/lib/OpenLayers/Control/KeyboardDefaults.js (modified) (1 diff)
- trunk/openlayers/lib/OpenLayers/Control/LayerSwitcher.js (modified) (1 diff)
- trunk/openlayers/lib/OpenLayers/Control/MouseDefaults.js (modified) (1 diff)
- trunk/openlayers/lib/OpenLayers/Control/MouseToolbar.js (modified) (2 diffs)
- trunk/openlayers/lib/OpenLayers/Control/PanZoom.js (modified) (1 diff)
- trunk/openlayers/lib/OpenLayers/Control/PanZoomBar.js (modified) (1 diff)
- trunk/openlayers/lib/OpenLayers/Control/Permalink.js (modified) (1 diff)
- trunk/openlayers/lib/OpenLayers/Control/Scale.js (modified) (1 diff)
- trunk/openlayers/lib/OpenLayers/Feature/WFS.js (modified) (2 diffs)
- trunk/openlayers/lib/OpenLayers/Layer.js (modified) (1 diff)
- trunk/openlayers/lib/OpenLayers/Layer/EventPane.js (modified) (2 diffs)
- trunk/openlayers/lib/OpenLayers/Layer/HTTPRequest.js (modified) (1 diff)
- trunk/openlayers/lib/OpenLayers/Layer/KaMap.js (modified) (1 diff)
- trunk/openlayers/lib/OpenLayers/Layer/MapServer.js (modified) (1 diff)
- trunk/openlayers/lib/OpenLayers/Layer/WFS.js (modified) (1 diff)
- trunk/openlayers/lib/OpenLayers/Layer/WMS.js (modified) (1 diff)
- trunk/openlayers/lib/OpenLayers/Layer/WMS/Untiled.js (modified) (1 diff)
- trunk/openlayers/lib/OpenLayers/Layer/WorldWind.js (modified) (1 diff)
- trunk/openlayers/lib/OpenLayers/Marker.js (modified) (1 diff)
- trunk/openlayers/lib/OpenLayers/Marker/Box.js (modified) (2 diffs)
- trunk/openlayers/lib/OpenLayers/Popup/Anchored.js (modified) (1 diff)
- trunk/openlayers/lib/OpenLayers/Popup/AnchoredBubble.js (modified) (1 diff)
- trunk/openlayers/lib/OpenLayers/Tile.js (modified) (1 diff)
- trunk/openlayers/lib/OpenLayers/Tile/Image.js (modified) (1 diff)
- trunk/openlayers/lib/OpenLayers/Tile/WFS.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/openlayers/lib/OpenLayers/Ajax.js
r1650 r1651 180 180 ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete']; 181 181 182 OpenLayers.Ajax.Request.prototype = OpenLayers. Util.extend(new OpenLayers.Ajax.Base(), {182 OpenLayers.Ajax.Request.prototype = OpenLayers.Class.inherit( OpenLayers.Ajax.Base, { 183 183 initialize: function(url, options) { 184 184 this.transport = OpenLayers.Ajax.getTransport(); trunk/openlayers/lib/OpenLayers/Control/ArgParser.js
r1634 r1651 10 10 OpenLayers.Control.ArgParser = OpenLayers.Class.create(); 11 11 OpenLayers.Control.ArgParser.prototype = 12 OpenLayers. Util.extend( new OpenLayers.Control(), {12 OpenLayers.Class.inherit( OpenLayers.Control, { 13 13 14 14 /** @type OpenLayers.LonLat */ trunk/openlayers/lib/OpenLayers/Control/KeyboardDefaults.js
r1588 r1651 10 10 OpenLayers.Control.KeyboardDefaults = OpenLayers.Class.create(); 11 11 OpenLayers.Control.KeyboardDefaults.prototype = 12 OpenLayers. Util.extend( new OpenLayers.Control(), {12 OpenLayers.Class.inherit( OpenLayers.Control, { 13 13 14 14 /** @type int */ trunk/openlayers/lib/OpenLayers/Control/LayerSwitcher.js
r1606 r1651 10 10 OpenLayers.Control.LayerSwitcher = OpenLayers.Class.create(); 11 11 OpenLayers.Control.LayerSwitcher.prototype = 12 OpenLayers. Util.extend( new OpenLayers.Control(), {12 OpenLayers.Class.inherit( OpenLayers.Control, { 13 13 14 14 /** @type String */ trunk/openlayers/lib/OpenLayers/Control/MouseDefaults.js
r1588 r1651 10 10 OpenLayers.Control.MouseDefaults = OpenLayers.Class.create(); 11 11 OpenLayers.Control.MouseDefaults.prototype = 12 OpenLayers. Util.extend( new OpenLayers.Control(), {12 OpenLayers.Class.inherit( OpenLayers.Control, { 13 13 14 14 /** @type Boolean */ trunk/openlayers/lib/OpenLayers/Control/MouseToolbar.js
r1588 r1651 13 13 OpenLayers.Control.MouseToolbar.Y = 300; 14 14 OpenLayers.Control.MouseToolbar.prototype = 15 OpenLayers. Util.extend( new OpenLayers.Control(),16 OpenLayers.Util.extend( new OpenLayers.Control.MouseDefaults(), {15 OpenLayers.Class.inherit( OpenLayers.Control, 16 OpenLayers.Control.MouseDefaults, { 17 17 18 18 mode: null, … … 307 307 } 308 308 } 309 }) );310 309 }); 310 trunk/openlayers/lib/OpenLayers/Control/PanZoom.js
r1588 r1651 12 12 OpenLayers.Control.PanZoom.Y = 4; 13 13 OpenLayers.Control.PanZoom.prototype = 14 OpenLayers. Util.extend( new OpenLayers.Control(), {14 OpenLayers.Class.inherit( OpenLayers.Control, { 15 15 16 16 /** @type int */ trunk/openlayers/lib/OpenLayers/Control/PanZoomBar.js
r1588 r1651 12 12 OpenLayers.Control.PanZoomBar.Y = 4; 13 13 OpenLayers.Control.PanZoomBar.prototype = 14 OpenLayers. Util.extend( new OpenLayers.Control.PanZoom(), {14 OpenLayers.Class.inherit( OpenLayers.Control.PanZoom, { 15 15 16 16 /** @type Array(...) */ trunk/openlayers/lib/OpenLayers/Control/Permalink.js
r1642 r1651 10 10 OpenLayers.Control.Permalink = OpenLayers.Class.create(); 11 11 OpenLayers.Control.Permalink.prototype = 12 OpenLayers. Util.extend( new OpenLayers.Control(), {12 OpenLayers.Class.inherit( OpenLayers.Control, { 13 13 14 14 /** @type DOMElement */ trunk/openlayers/lib/OpenLayers/Control/Scale.js
r1641 r1651 10 10 OpenLayers.Control.Scale = OpenLayers.Class.create(); 11 11 OpenLayers.Control.Scale.prototype = 12 OpenLayers. Util.extend( new OpenLayers.Control(), {12 OpenLayers.Class.inherit( OpenLayers.Control, { 13 13 /** @type DOMElement */ 14 14 element: null, trunk/openlayers/lib/OpenLayers/Feature/WFS.js
r1650 r1651 10 10 OpenLayers.Feature.WFS = OpenLayers.Class.create(); 11 11 OpenLayers.Feature.WFS.prototype = 12 OpenLayers. Util.extend( new OpenLayers.Feature(), {12 OpenLayers.Class.inherit( OpenLayers.Feature, { 13 13 14 14 /** … … 20 20 initialize: function(layer, xmlNode) { 21 21 var newArguments = arguments; 22 if (arguments.length > 0) { 23 var data = this.processXMLNode(xmlNode); 24 newArguments = new Array(layer, data.lonlat, data) 25 } 22 var data = this.processXMLNode(xmlNode); 23 newArguments = new Array(layer, data.lonlat, data) 26 24 OpenLayers.Feature.prototype.initialize.apply(this, newArguments); 27 28 if (arguments.length > 0) { 29 this.createMarker(); 30 this.layer.addMarker(this.marker); 31 } 25 this.createMarker(); 26 this.layer.addMarker(this.marker); 32 27 }, 33 28 trunk/openlayers/lib/OpenLayers/Layer.js
r1620 r1651 105 105 */ 106 106 initialize: function(name, options) { 107 if (arguments.length > 0) { 108 109 //store a copy of the custom options for later cloning 110 this.options = OpenLayers.Util.extend(new Object(), options); 111 112 //add options to layer 113 OpenLayers.Util.extend(this, this.options); 114 115 this.name = name; 116 117 this.id = OpenLayers.Util.createUniqueID(this.CLASS_NAME + "_"); 118 119 if (this.div == null) { 120 this.div = OpenLayers.Util.createDiv(); 121 this.div.style.width = "100%"; 122 this.div.style.height = "100%"; 123 this.div.id = this.id; 124 } 107 //store a copy of the custom options for later cloning 108 this.options = OpenLayers.Util.extend(new Object(), options); 109 110 //add options to layer 111 OpenLayers.Util.extend(this, this.options); 112 113 this.name = name; 114 115 this.id = OpenLayers.Util.createUniqueID(this.CLASS_NAME + "_"); 116 117 if (this.div == null) { 118 this.div = OpenLayers.Util.createDiv(); 119 this.div.style.width = "100%"; 120 this.div.style.height = "100%"; 121 this.div.id = this.id; 125 122 } 126 123 }, trunk/openlayers/lib/OpenLayers/Layer/EventPane.js
r1613 r1651 11 11 OpenLayers.Layer.EventPane = OpenLayers.Class.create(); 12 12 OpenLayers.Layer.EventPane.prototype = 13 OpenLayers. Util.extend(newOpenLayers.Layer, {13 OpenLayers.Class.inherit( OpenLayers.Layer, { 14 14 15 15 /** EventPaned layers are always base layers, by necessity. … … 34 34 initialize: function(name, options) { 35 35 OpenLayers.Layer.prototype.initialize.apply(this, arguments); 36 37 if (arguments.length > 0) { 38 if (this.pane == null) { 39 this.pane = OpenLayers.Util.createDiv(); 40 } 36 if (this.pane == null) { 37 this.pane = OpenLayers.Util.createDiv(); 41 38 } 42 39 }, trunk/openlayers/lib/OpenLayers/Layer/HTTPRequest.js
r1649 r1651 29 29 initialize: function(name, url, params, options) { 30 30 var newArguments = arguments; 31 if (arguments.length > 0) { 32 newArguments = [name, options]; 33 } 31 newArguments = [name, options]; 34 32 OpenLayers.Layer.prototype.initialize.apply(this, newArguments); 35 33 this.url = url; trunk/openlayers/lib/OpenLayers/Layer/KaMap.js
r1649 r1651 32 32 OpenLayers.Layer.Grid.prototype.initialize.apply(this, newArguments); 33 33 this.params = (params ? params : {}); 34 if ( arguments.length > 0 &¶ms) {34 if (params) { 35 35 OpenLayers.Util.applyDefaults( 36 36 this.params, trunk/openlayers/lib/OpenLayers/Layer/MapServer.js
r1649 r1651 25 25 initialize: function(name, url, params) { 26 26 var newArguments = new Array(); 27 if (arguments.length > 0) { 28 //uppercase params 29 params = OpenLayers.Util.upperCaseObject(params); 30 newArguments.push(name, url, params); 31 } 27 //uppercase params 28 params = OpenLayers.Util.upperCaseObject(params); 29 newArguments.push(name, url, params); 32 30 OpenLayers.Layer.Grid.prototype.initialize.apply(this, newArguments); 33 31 trunk/openlayers/lib/OpenLayers/Layer/WFS.js
r1649 r1651 53 53 initialize: function(name, url, params, options) { 54 54 var newArguments = new Array(); 55 if (arguments.length > 0) { 56 //uppercase params 57 params = OpenLayers.Util.upperCaseObject(params); 58 newArguments.push(name, url, params, options); 59 } 55 //uppercase params 56 params = OpenLayers.Util.upperCaseObject(params); 57 newArguments.push(name, url, params, options); 60 58 OpenLayers.Layer.Grid.prototype.initialize.apply(this, newArguments); 61 59 62 60 var newArguments = new Array(); 63 if (arguments.length > 0) { 64 //uppercase params 65 newArguments.push(name, options); 66 } 61 //uppercase params 62 newArguments.push(name, options); 67 63 OpenLayers.Layer.Markers.prototype.initialize.apply(this, newArguments); 68 64 69 if (arguments.length > 0) { 70 OpenLayers.Util.applyDefaults( 71 this.params, 72 OpenLayers.Util.upperCaseObject(this.DEFAULT_PARAMS) 73 ); 74 } 65 OpenLayers.Util.applyDefaults( 66 this.params, 67 OpenLayers.Util.upperCaseObject(this.DEFAULT_PARAMS) 68 ); 75 69 }, 76 70 trunk/openlayers/lib/OpenLayers/Layer/WMS.js
r1649 r1651 32 32 initialize: function(name, url, params, options) { 33 33 var newArguments = new Array(); 34 if (arguments.length > 0) { 35 //uppercase params 36 params = OpenLayers.Util.upperCaseObject(params); 37 newArguments.push(name, url, params, options); 38 } 34 //uppercase params 35 params = OpenLayers.Util.upperCaseObject(params); 36 newArguments.push(name, url, params, options); 39 37 OpenLayers.Layer.Grid.prototype.initialize.apply(this, newArguments); 40 41 if (arguments.length > 0) { 42 OpenLayers.Util.applyDefaults( 43 this.params, 44 OpenLayers.Util.upperCaseObject(this.DEFAULT_PARAMS) 45 ); 46 } 38 OpenLayers.Util.applyDefaults( 39 this.params, 40 OpenLayers.Util.upperCaseObject(this.DEFAULT_PARAMS) 41 ); 47 42 48 43 // unless explicitly set in options, if the layer is transparent, trunk/openlayers/lib/OpenLayers/Layer/WMS/Untiled.js
r1649 r1651 36 36 initialize: function(name, url, params, options) { 37 37 var newArguments = new Array(); 38 if (arguments.length > 0) { 39 //uppercase params 40 params = OpenLayers.Util.upperCaseObject(params); 41 newArguments.push(name, url, params, options); 42 } 38 //uppercase params 39 params = OpenLayers.Util.upperCaseObject(params); 40 newArguments.push(name, url, params, options); 43 41 OpenLayers.Layer.HTTPRequest.prototype.initialize.apply(this, 44 42 newArguments); 45 46 if (arguments.length > 0) { 47 OpenLayers.Util.applyDefaults( 48 this.params, 49 OpenLayers.Util.upperCaseObject(this.DEFAULT_PARAMS) 50 ); 51 } 43 OpenLayers.Util.applyDefaults( 44 this.params, 45 OpenLayers.Util.upperCaseObject(this.DEFAULT_PARAMS) 46 ); 52 47 53 48 // unless explicitly set in options, if the layer is transparent, trunk/openlayers/lib/OpenLayers/Layer/WorldWind.js
r1649 r1651 33 33 OpenLayers.Layer.Grid.prototype.initialize.apply(this, newArguments); 34 34 this.params = (params ? params : {}); 35 if ( arguments.length > 0 &¶ms) {35 if (params) { 36 36 OpenLayers.Util.applyDefaults( 37 37 this.params, trunk/openlayers/lib/OpenLayers/Marker.js
r1588 r1651 29 29 */ 30 30 initialize: function(lonlat, icon) { 31 if (arguments.length > 0) { 32 this.lonlat = lonlat; 33 34 var newIcon = (icon) ? icon : OpenLayers.Marker.defaultIcon(); 35 if (this.icon == null) { 36 this.icon = newIcon; 37 } else { 38 this.icon.url = newIcon.url; 39 this.icon.size = newIcon.size; 40 this.icon.offset = newIcon.offset; 41 this.icon.calculateOffset = newIcon.calculateOffset; 42 } 43 this.events = new OpenLayers.Events(this, this.icon.imageDiv, null); 31 this.lonlat = lonlat; 32 33 var newIcon = (icon) ? icon : OpenLayers.Marker.defaultIcon(); 34 if (this.icon == null) { 35 this.icon = newIcon; 36 } else { 37 this.icon.url = newIcon.url; 38 this.icon.size = newIcon.size; 39 this.icon.offset = newIcon.offset; 40 this.icon.calculateOffset = newIcon.calculateOffset; 44 41 } 42 this.events = new OpenLayers.Events(this, this.icon.imageDiv, null); 45 43 }, 46 44 trunk/openlayers/lib/OpenLayers/Marker/Box.js
r1588 r1651 9 9 */ 10 10 OpenLayers.Marker.Box = OpenLayers.Class.create(); 11 OpenLayers.Marker.Box.prototype = OpenLayers. Util.extend( new OpenLayers.Marker(), {11 OpenLayers.Marker.Box.prototype = OpenLayers.Class.inherit( OpenLayers.Marker, { 12 12 /** @type OpenLayers.LonLat */ 13 13 bounds: null, … … 22 22 */ 23 23 initialize: function(bounds, borderColor, borderWidth) { 24 if (arguments.length > 0) { 25 this.bounds = bounds; 26 this.div = OpenLayers.Util.createDiv(); 27 this.div.style.overflow = 'hidden'; 28 this.events = new OpenLayers.Events(this, this.div, null); 29 this.setBorder(borderColor, borderWidth); 30 } 24 this.bounds = bounds; 25 this.div = OpenLayers.Util.createDiv(); 26 this.div.style.overflow = 'hidden'; 27 this.events = new OpenLayers.Events(this, this.div, null); 28 this.setBorder(borderColor, borderWidth); 31 29 }, 32 30 trunk/openlayers/lib/OpenLayers/Popup/Anchored.js
r1588 r1651 10 10 OpenLayers.Popup.Anchored = OpenLayers.Class.create(); 11 11 OpenLayers.Popup.Anchored.prototype = 12 OpenLayers. Util.extend( new OpenLayers.Popup(), {12 OpenLayers.Class.inherit( OpenLayers.Popup, { 13 13 14 14 /** "lr", "ll", "tr", "tl" - relative position of the popup. trunk/openlayers/lib/OpenLayers/Popup/AnchoredBubble.js
r1590 r1651 14 14 15 15 OpenLayers.Popup.AnchoredBubble.prototype = 16 OpenLayers. Util.extend( new OpenLayers.Popup.Anchored(), {16 OpenLayers.Class.inherit( OpenLayers.Popup.Anchored, { 17 17 18 18 /** @type DOMElement */ trunk/openlayers/lib/OpenLayers/Tile.js
r1590 r1651 47 47 */ 48 48 initialize: function(layer, position, bounds, url, size) { 49 if (arguments.length > 0) { 50 this.layer = layer; 51 this.position = position; 52 this.bounds = bounds; 53 this.url = url; 54 this.size = size; 49 this.layer = layer; 50 this.position = position; 51 this.bounds = bounds; 52 this.url = url; 53 this.size = size; 55 54 56 //give the tile a unique id based on its BBOX. 57 this.id = OpenLayers.Util.createUniqueID("Tile_"); 58 } 55 //give the tile a unique id based on its BBOX. 56 this.id = OpenLayers.Util.createUniqueID("Tile_"); 59 57 }, 60 58 trunk/openlayers/lib/OpenLayers/Tile/Image.js
r1588 r1651 10 10 OpenLayers.Tile.Image = OpenLayers.Class.create(); 11 11 OpenLayers.Tile.Image.prototype = 12 OpenLayers. Util.extend( new OpenLayers.Tile(), {12 OpenLayers.Class.inherit( OpenLayers.Tile, { 13 13 14 14 /** @type DOMElement img */ trunk/openlayers/lib/OpenLayers/Tile/WFS.js
r1650 r1651 10 10 OpenLayers.Tile.WFS = OpenLayers.Class.create(); 11 11 OpenLayers.Tile.WFS.prototype = 12 OpenLayers. Util.extend( new OpenLayers.Tile(), {12 OpenLayers.Class.inherit( OpenLayers.Tile, { 13 13 14 14 /** @type Array(OpenLayers.Feature)*/ … … 29 29 initialize: function(layer, position, bounds, urls, size) { 30 30 var newArguments = arguments; 31 if (arguments.length > 0) { 32 newArguments = [layer, position, bounds, null, size]; 33 } 31 newArguments = [layer, position, bounds, null, size]; 34 32 OpenLayers.Tile.prototype.initialize.apply(this, newArguments); 35 36 33 this.urls = urls; 37 34 this.features = new Array();
