Hi
Did the following to test
setMouseEventInterpreter(new StandardMapMouseInterpreter(this) {
_at_Override
public boolean testForAndHandlePopupTrigger(MouseEvent e) {
if (e.isPopupTrigger()) {
boolean result;
GeometryOfInterest goi = getClickInterest();
// If there is a click interest
if (goi != null) {
// Tell the policy it an OMGraphic was clicked.
goi.setLeftButton(false);
result = rightClick(goi.getGeometry(), e);
} else {
result = rightClick(e);
}
return result;
}
return false;
}
});
This fixes the problem as far as I can tell.
I believe this problem will affect everybody trying to interact with a
OMGraphicHandlerLayer in Navigation mouse mode. If there are other
layers in the stack they will also be affected by this as all right
clicks ends at the first OMGraphicHandlerLayer with a
StandardMapMouseInterpreter installed.
BR
Carsten
Carsten Ø. Madsen wrote:
> Hi
>
> I have a very simple class that extends OMGraphicHandlerLayer. It just
> overrides getItemsForOMGraphicMenu. If I set mouseModes=Gestures Pan
> Navigation and consumeEvents=true using right click to do rubberband
> zoom just draws the rubberband but no zoom occurs in navigation mouse
> mode.
>
> In StandardMapMouseInterpreter (rev 1.11.2.5) the following code is
> activated when a right click occurs:
>
> /**
> * Tests the MouseEvent to see if it's a popup trigger, and calls
> * rightClick appropriately if there is an OMGraphic involved.
> *
> * _at_param e MouseEvent
> * _at_return true if the MouseEvent is a popup trigger.
> */
> public boolean testForAndHandlePopupTrigger(MouseEvent e) {
> if (e.isPopupTrigger()) {
> GeometryOfInterest goi = getClickInterest();
> // If there is a click interest
> if (goi != null) {
> // Tell the policy it an OMGraphic was clicked.
> goi.setLeftButton(false);
> rightClick(goi.getGeometry(), e);
> } else {
> rightClick(e);
> }
> return true;
> }
> return false;
> }
>
> It seems to me that the boolean value returned from the rightClick
> calls is ignored causing the above described behaviour when in
> NavMouseMode?
> BR
> Carsten
>
> --
> [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"]
--
[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 Wed Jul 02 2008 - 17:10:16 EDT