gwt-openlayers 中的 mousemove 事件
我正在尝试捕获 gwt-openlayers 中的鼠标事件。 以下处理程序确实接收事件,但我是 无法从 EventObject 对象中提取鼠标位置。 有人可以帮忙吗?
mapPanel.getMap().getEvents().register("mousemove", mapPanel.getMap(), new EventHandler() {
@Override
public void onHandle(EventObject eventObject) {
// how to obtain mouse position ?
}
});
另外,还有其他方法接收鼠标移动事件吗?我可以拦截吗 鼠标位置控制这个?
非常感谢您的帮助。
I am trying to capture mouse events in gwt-openlayers.
The following handler does receive events, however I am
unable to extract mouse position from EventObject object.
Anybody can help ?
mapPanel.getMap().getEvents().register("mousemove", mapPanel.getMap(), new EventHandler() {
@Override
public void onHandle(EventObject eventObject) {
// how to obtain mouse position ?
}
});
Also, is there another way to receive mouse move events ? Can I intercept
MousePosition Control for this ?
Thanks a lot for any help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我自己查看了源代码并找到了答案。我希望它对其他人有用。
I went through the source code and found an answer myself. I hope it can be useful to somebody else.