Changeset 1872
- Timestamp:
- 11/16/06 04:03:17 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/openlayers/lib/OpenLayers/Layer/HTTPRequest.js
r1721 r1872 110 110 var url = (altUrl == null) ? this.url : altUrl; 111 111 112 // if url is not a string, it should be an array of strings, 113 // in which case we will randomly select one of them in order 114 // to evenly distribute requests to different urls. 115 if (typeof url == "object") { 116 url = url[Math.floor(Math.random()*url.length)]; 117 } 112 118 // requestString always starts with url 113 119 var requestString = url; … … 118 124 var allParams = OpenLayers.Util.extend(allParams, newParams); 119 125 var paramsString = OpenLayers.Util.getParameterString(allParams); 120 121 126 if (paramsString != "") { 122 var lastServerChar = this.url.charAt(this.url.length - 1);127 var lastServerChar = url.charAt(url.length - 1); 123 128 if ((lastServerChar == "&") || (lastServerChar == "?")) { 124 129 requestString += paramsString; 125 130 } else { 126 if ( this.url.indexOf('?') == -1) {131 if (url.indexOf('?') == -1) { 127 132 //serverPath has no ? -- add one 128 133 requestString += '?' + paramsString;
