Please hear me out, I've read the other posts on this subject, but they don't
seem to be addressing the same exact problem.
I have two layers that extend OMGraphicHandlerLayer (let's call them layer
Alpha and layer Beta). In both of these layers I have overridden the
getItemsForMapMenu() method and return a List of JMenuItem objects from
each.
The problem is, when I right click on a spot on the map the popup menu that
is displayed only contains the menu items for one of the layers (Alpha), not
both. If I remove the Alpha layer from the map, the menu items for Beta are
displayed in the popup menu.
NOTE: This is not a problem with the mouse events being consumed by the
Alpha layer. I have put debug (System.out calls) in the getItemsForMapMenu
method in the Beta layer, and when I right click on the map I see a menu
with the menu items from the Alpha layer, but the System.out calls are
getting written out from the Beta layer.
So, how do I make my right click menu contain the menu items from all of my
layers (in this case, Alpha and Beta)?
Thanks in advance...
-Kennedy
--
View this message in context: http://www.nabble.com/getItemsForMapMenu%28%29-not-working-with-multiple-layers.-tp16960449p16960449.html
Sent from the OpenMap mailing list archive at Nabble.com.
--
[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 Tue Apr 29 2008 - 09:32:58 EDT