[OpenLayers-Users] 2.12RC3 WMSGetFeatureInfo event problem caused by change in WMS.js reverseAxisOrder function

Daniel Behr daniel.behr at hzg.de
Mon May 7 10:57:46 EDT 2012


Hello,
thanks for the great work on new OL 2.12, some cool new features...
I just tested RC3 and one thing doesnt work in my app as before with 2.11.

Firebug gives an error which leads to a change in WMS.js from this in 2.11:

reverseAxisOrder: function() {
	return (parseFloat(this.params.VERSION) >= 1.3 &&
	!!this.yx[this.map.getProjectionObject().getCode()]);
}

to this since 2.12RC3:

reverseAxisOrder: function() {
	var projCode = this.projection.getCode();
	return parseFloat(this.params.VERSION) >= 1.3 &&
	!!(this.yx[projCode] || OpenLayers.Projection.defaults[projCode].yx);
}

Both this.map and this.projection are null at this point, which breaks 
the GFI call in 2.12RCs.

Is this expected behaviour or am I missing something in my GFI 
definition [1]

thanks
Daniel


[1]
function initBathyInfo(){
   bathyControl = new OpenLayers.Control.WMSGetFeatureInfo({
   	url: '../geoserver/wms',
   	hover: true,
   	maxFeatures: 1,
     	autoActivate: true,
   	allowSelection: true,
   	layers: [new OpenLayers.Layer.WMS("_",
     		"../geoserver/wms", {
		layers: ["wimo:bathyInfo_N","wimo:bathyInfo_O"]
     		})
     	]
   });
   function showInfo(evt) {
	...
   };
   bathyControl.events.register("getfeatureinfo", this, showInfo);
   map.addControl(bathyControl);
}


Helmholtz-Zentrum Geesthacht 
Zentrum für Material- und Küstenforschung GmbH 
Max-Planck-Straße 1 I 21502 Geesthacht I Deutschland/Germany 

Geschäftsführer/Board of Management: Prof. Dr. Wolfgang Kaysser, Dipl.-Ing. Michael Ganß 
Vorsitzender des Aufsichtsrates/Chairman of the Supervisory Board: MinDirig Wilfried Kraus 
Amtsgericht Lübeck HRB 285 GE (Register Court) 
Internet: http://www.hzg.de  


More information about the Users mailing list