Re: [OpenMap Users] invisible layer

From: Don Dietrick <dietrick_at_bbn.com>
Date: Tue, 24 Aug 2004 13:40:07 -0400

Actually, adding a layer will create entries in the LayersMenu and
LayersPanel, and you probably don't want that.

You can create a component that implements java.awt.event.MouseListener
and java.awt.event.MouseMotionListener and add it to the MapBean, and
you'll get events just like the MouseMode. You might want that
component to implement java.beans.PropertyChangeListener and have it
listen to the MouseDelegator for which MouseMode is active, so you can
add that component as a MouseListener to the MapBean at certain times.

That's the java way. The OpenMap way would be to create your own
MapMouseListener and add it to the active mouse mode, but it might get
removed as a listener from that mouse mode when the active mode changes
or if the layers added to the Mapbean change. The MouseDelegator
assumes that the MapMouseModes are being only used by layers (which is
too bad, it probably shouldn't do that).

- Don

On Aug 24, 2004, at 10:43 AM, Hudson Brian R Contr AFRL/IFSF wrote:

> Hey,
>
> Just subclass Layer and listen for the mouse.
>
> Don't forget that the Z order effects the order in which mouse clicks
> are
> handled.
>
> By default the layer is 'invisible'.
>
> Brian Hudson
>
> -----Original Message-----
> From: owner-openmap-users_at_bbn.com [mailto:owner-openmap-users_at_bbn.com]
> On
> Behalf Of Ben Podoll
> Sent: Tuesday, August 24, 2004 10:21 AM
> To: openmap-users_at_bbn.com
> Subject: [OpenMap Users] invisible layer
>
>
> What is the best way to create an invisible layer? I want to have an
> invisible layer present on the map so I can capture clicks and
> calculate the
> closest point?
>
>
> --
> [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"]
>
>


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Don Dietrick, dietrick_at_bbn.com
BBN Technologies, Cambridge, MA
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

--
[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 Aug 24 2004 - 13:41:14 EDT

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