[OpenLayers-Dev] Selecting features on multiple layers

robelix roland at robelix.com
Thu Jul 17 11:29:56 EDT 2008



Antti Nieminen wrote:
> 
> Hello,
> 
> I've worked a bit with the feature event issue for multiple layers,
> described in ticket #434.
> http://trac.openlayers.org/ticket/434
> 

A small change, to make it work in IE7, too

In MultiLayerFeature.js  at line 344:

    createEventGeometry: function(evt) {
     	var x = evt.layerX;
     	var y = evt.layerY;

change to:
	var x = evt.xy.x;
	var y = evt.xy.y;

It seems that the coordinates sometimes differ a few pixel in FF, but the
.layerX/Y are undefined in IE. Maybe add a check if layerX/Y is defined?
-- 
View this message in context: http://www.nabble.com/Selecting-features-on-multiple-layers-tp17751739p18506000.html
Sent from the OpenLayers Dev mailing list archive at Nabble.com.




More information about the Dev mailing list