Ticket #653: defaultParams.patch
| File defaultParams.patch, 1.1 kB (added by euzuro, 2 years ago) |
|---|
-
lib/OpenLayers/Layer/HTTPRequest.js
old new 19 19 */ 20 20 URL_HASH_FACTOR: (Math.sqrt(5) - 1) / 2, 21 21 22 /** @final @type Object */ 23 DEFAULT_PARAMS: null, 24 22 25 /** This is either an array of url strings or a single url string. 23 26 * 24 27 * @type Array(String) or String */ … … 51 54 newArguments = [name, options]; 52 55 OpenLayers.Layer.prototype.initialize.apply(this, newArguments); 53 56 this.url = url; 54 this.params = OpenLayers.Util.extend( new Object(), params); 57 58 //Set Params 59 // 60 61 //if 'params' is already set, let it be. A subclass might be setting 62 // these before calling this initialize. 63 if (this.params == null) { 64 this.params = new Object(); 65 } 66 67 //add default params 68 OpenLayers.Util.extend(this.params, this.DEFAULT_PARAMS); 69 70 //add argument params 71 OpenLayers.Util.extend(this.params, params); 55 72 }, 56 73 57 74 /**
