need to make WMS & WFS case-independent. I dont know why I chose to move them all to uppercase instead of lowercase, but I did. This required changing the test cases and the 'srs' property which is set in Grid. Personally, I dont think that is the best place to set it, but so be it jedi. As long as I have the mic, i'd add that having 'projection' stored in both map and layer objects seems a bit redundant as well.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@493 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -220,7 +220,7 @@ OpenLayers.Layer.Grid.prototype = Object.extend( new OpenLayers.Layer(), {
|
||||
*/
|
||||
getFullRequestString:function(params) {
|
||||
var requestString = "";
|
||||
this.params.srs = this.projection;
|
||||
this.params.SRS = this.projection;
|
||||
// concat tile params with layer params and convert to string
|
||||
var allParams = Object.extend(params, this.params);
|
||||
var paramsString = OpenLayers.Util.getParameterString(allParams);
|
||||
|
||||
@@ -31,13 +31,18 @@ OpenLayers.Layer.WFS.prototype =
|
||||
|
||||
var newArguments = new Array();
|
||||
if (arguments.length > 0) {
|
||||
//uppercase params
|
||||
params = OpenLayers.Util.upperCaseObject(params);
|
||||
newArguments.push(name, url, params);
|
||||
}
|
||||
OpenLayers.Layer.Grid.prototype.initialize.apply(this, newArguments);
|
||||
OpenLayers.Layer.Markers.prototype.initialize.apply(this, newArguments);
|
||||
|
||||
if (arguments.length > 0) {
|
||||
OpenLayers.Util.applyDefaults(this.params, this.DEFAULT_PARAMS);
|
||||
OpenLayers.Util.applyDefaults(
|
||||
this.params,
|
||||
OpenLayers.Util.upperCaseObject(this.DEFAULT_PARAMS)
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -78,7 +83,7 @@ OpenLayers.Layer.WFS.prototype =
|
||||
*/
|
||||
addTile:function(bounds, position) {
|
||||
url = this.getFullRequestString(
|
||||
{ bbox:bounds.toBBOX() });
|
||||
{ BBOX:bounds.toBBOX() });
|
||||
var tile = new OpenLayers.Tile.WFS(this, position, bounds,
|
||||
url, this.tileSize);
|
||||
tile.draw();
|
||||
|
||||
@@ -25,12 +25,17 @@ OpenLayers.Layer.WMS.prototype =
|
||||
initialize: function(name, url, params) {
|
||||
var newArguments = new Array();
|
||||
if (arguments.length > 0) {
|
||||
//uppercase params
|
||||
params = OpenLayers.Util.upperCaseObject(params);
|
||||
newArguments.push(name, url, params);
|
||||
}
|
||||
OpenLayers.Layer.Grid.prototype.initialize.apply(this, newArguments);
|
||||
|
||||
if (arguments.length > 0) {
|
||||
OpenLayers.Util.applyDefaults(this.params, this.DEFAULT_PARAMS);
|
||||
OpenLayers.Util.applyDefaults(
|
||||
this.params,
|
||||
OpenLayers.Util.upperCaseObject(this.DEFAULT_PARAMS)
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -62,9 +67,9 @@ OpenLayers.Layer.WMS.prototype =
|
||||
*/
|
||||
addTile:function(bounds,position) {
|
||||
url = this.getFullRequestString(
|
||||
{bbox:bounds.toBBOX(),
|
||||
width:this.tileSize.w,
|
||||
height:this.tileSize.h});
|
||||
{BBOX:bounds.toBBOX(),
|
||||
WIDTH:this.tileSize.w,
|
||||
HEIGHT:this.tileSize.h});
|
||||
var tile = new OpenLayers.Tile.Image(this, position, bounds,
|
||||
url, this.tileSize);
|
||||
tile.draw();
|
||||
|
||||
Reference in New Issue
Block a user