Re: [OpenMap Users] Popup menus using different layers

From: Carsten Ø. Madsen <com_at_navicon.dk>
Date: Tue, 15 Jan 2008 23:28:27 +0100

Hello

Take at look at how mouse events are (not) consumed by your layers. See
setConsumeEvents in AbstractMouseMode or use properties to set how mouse
events are consumed by the mouse modes used in the layers.

xxx.mouseModes=Gestures
xxx.consumeEvents=false

Also see
http://www.nabble.com/Multiple-LocationLayers-with-Popup-Menus-td8720484.html

BR
Carsten

Alessio Iannone wrote:
> 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 <mailto: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 <http://www.shorinjikempo-ryu.it>* *
> * * *Nextant - Navcomm Applications* <http://www.next.it>
> Via Alessandro Noale
> <http://maps.google.com/maps?q=Via+Alessandro+Noale&hl=en>
>
> See who we know in common <http://www.linkedin.com/e/wwk/7254039/>
> Want a signature like this? <http://www.linkedin.com/e/sig/7254039/>
>
>
>
> ------------------------------------------------------------------------
> ------------------------------------------------------------------------
> L'email della prossima generazione? Puoi averla con la nuova Yahoo!
> Mail
> <http://us.rd.yahoo.com/mail/it/taglines/hotmail/nowyoucan/nextgen/*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 - 17:50:50 EST

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