[OpenMap Users] How to disable mouseDrag events in OMGraphicHandlerLayer?

From: Joey Heinrich <joey.heinrich_at_gmail.com>
Date: Mon, 23 May 2005 11:54:18 -0700

I have a map using NavMouseMode2 and a layer on top of it that extends
OMGraphicHandlerLayer with several OMGraphics on it. I managed to get
little popup menus when I right click on the OMGraphic objects, which
is what I was after. My problem is this...

I didn't want the click to filter through the top layer down onto the
map, because if it does, the map recenters on the point and the site
goes to the center of the map while the popup window stays where the
mouse is. I tried to fix this by setting the top layer to consume
events when the mouse gets over the object with the highlight method.
I then reset consume events for the top layer to false in unhighlight.
 This works great for all mouse actions with the exception of
mousedragged. It doesn't crash the program but does cause numerous
NullPointerExceptions when you click on a OMGraphic object and then
perform the mousedragged action.

Any tips on how I might work around this implementing all of the
MapMouseInterpreter methods within the class? I tried making the
object selectable and then added a try/catch within the select method,
thinking that might catch it, but I guess the select method only
handles the initial click event and not what happens afterwards.

-Joey

--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Mon May 23 2005 - 14:55:09 EDT

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:06 EDT