Handle projections with different aliases: smarter Projection.equals and Layer.WMS.getFullRequestString methods. r=tschaub (closes #2914)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@10869 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
ahocevar
2010-11-05 07:33:38 +00:00
parent aa9112c494
commit b9517a4cb5
4 changed files with 103 additions and 11 deletions

View File

@@ -252,7 +252,10 @@ OpenLayers.Layer.WMS = OpenLayers.Class(OpenLayers.Layer.Grid, {
* {String}
*/
getFullRequestString:function(newParams, altUrl) {
var projectionCode = this.map.getProjection();
var mapProjection = this.map.getProjectionObject();
var projectionCode = this.projection.equals(mapProjection) ?
this.projection.getCode() :
mapProjection.getCode();
var value = (projectionCode == "none") ? null : projectionCode
if (parseFloat(this.params.VERSION) >= 1.3) {
this.params.CRS = value;