Re: [OpenMap Users] Adding MouseEvent to OMGraphics Object

From: Denis Balazuc <denis.balazuc@ni2.ca>
Date: Fri Mar 26 2004 - 12:46:43 EST

Hello Karl, hello all.

I have the exact same problem - I want to react on a selection and also
highlight items when the mouse hovers on them.
I was in the hope that OMGraphic would have some settable listeners
somehow so I haven't really found a workaround apart from
using the

OMGraphicList.selectClosest(int x, int y).

method.

The trouble is that this assumes you have only one OMGraphic located at
the specified point,
so I am suspecting that there is a better way to achieve this...

Hope this helps

Karl Koch wrote:

>Hi,
>
>I hope my direct questions are not annoying anybody. I just have a few days
>to solve something and I cannot spend long time in finding out things by
>myself. This is the main reasion why I ask here.
>
>is there a way to catch if a OMGraphics Object was clicked by the user
>without doing any position calculation on the layer (in order to find out which
>OMGraphics Object is was) ? I did that once for another GIS API and needed a
>kind of algorithm which caluculated a scare around any object to make a
>decision if the user clicked inside or outside this invisible square.
>
>Can I directly attach a listener to a OMGraphics object or is there a way to
>do that in a very easy way?
>Who has a piece of sourcecode to which I could have a look.
>
>Ralf
>
>
>

--
[To unsubscribe to this list send an email to "majdart@bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Fri Mar 26 14:48:36 2004

This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:38 EDT