[OpenMap Users] Popup menus using different layers

From: Alessio Iannone <alessio_iannone_at_yahoo.it>
Date: Tue, 15 Jan 2008 15:22:53 +0000 (GMT)

Hello to everyone I have a problem in trying to show a popup menu for objects rendered on the map. Basically I have the following situation: a BackgroundMap (ShapeLayer) a GraticuleLayer and two ObjectLayer, one for ground unit and one for air unit (ObjectLayerA,ObjectLayerB). The object Layer (BasicLayer) is built extending OMGraphicHandlerLayer and setting the OMGraphicList. When I right click on the map I see, reading the process output, that there are 2 Instances of my BasicLayer (as expected) because both getItemsForMapMenu and getItemsForOMGraphicMenu are called. So for example may happen that on the first instance the getItemsForOMGraphicMenu is Called and right afterwards getItemsForMapMenu is called on the second instance so the popup menus for the object is not shown because hidden by the last one (getItemsForMapMenu).To bypass this I have introduced a static attribute, into BasicLayer class, that take into account timing of events and give priority to Popup Menu of objects. I would like to know if there is a better way to handle this situation were different layers of objects are present. Is not acceptable for me to use only one layer to handle object rendering. That means that I have also thought to merge the two layers and handle object rendering priority (z-index) internally into a single layer....but I have to rewrite handling of turn-on/off of layers and other things. There is another strange thing. Very often happens that one of my object layers isn't receiving events regarding the popup menus. I just need to maximize the JFrame container or to fire some ZoomEvent and so on to be able to see the popup menu again. For this problem I have already tried to force a repaint/revalidate on the container but i didn't succeed. Do you have any hints? Best regards Alessio Iannone Alessio Iannone Software Engineer Mobile: 39 329 8834960 Email: alessio.iannone_at_nextant.it IM: quonn77_at_hotmail.com (AIM) http://www.linkedin.com/in/alessioiannone Web sites of the Martial Arts I play Nextant - Navcomm Applications Via Alessandro Noale See who we know in common Want a signature like this? ___________________________________ L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail: http://it.docs.yahoo.com/nowyoucan.html

[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 Jan 15 2008 - 10:32:50 EST

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