当光标在地图上移动时,qooxdoo 中的“mousemove”文档侦听器在最新版本的 OpenLayers(2.13 和 2.13.1)中被阻止。我认为我可以通过收听 OpenLayers 的“mousemove”侦听器来绕过这个问题,并在此基础上模拟一个 mousemove 事件,但它们的事件与 qooxdoo 正在寻找的不同。所以我尝试使用 qx.event.type.Mouse() 来模拟 mousemove 事件;它部分工作,但破坏了地图平移功能并引发此错误(未捕获的类型错误:无法读取未定义鼠标的属性 'pageX' - 第 229 行)。有什么建议么?
// OpenLayers mousemove Listener
var events = me.map.events;
events.register("mousemove",me.map, function(e){
var e = new qx.event.type.Mouse();
console.log("Attempt to make a Qooxdoo mouse position at OpenLayers location", e);
me.mouseoverPopup.placeToMouse(e);
return true;
},true);
// Qooxdoo document mousemove listener
// ** this was my old standard but OL 2.13 blocks this from occurring when
// I move over the map.
qx.bom.Element.addListener(document, "mousemove", function(e)
{
me.mouseoverPopup.placeToMouse(e);
}, this);