Re: [OpenMap Users] Access to other layers from a layer?

From: OpenMap Support <openmap_at_bbn.com>
Date: Sat, 26 Feb 2005 07:24:41 -0500

Hi Affan,

On Feb 25, 2005, at 5:46 PM, Affan Qureshi wrote:

> I want to create a Status Window in the application showing various
> statistics at the current time. I have extended the LabelLayer and
> added
> the TimerPing so that it updates the label string each at each
> interval.
> Is this the right idea?

Sure, if it works for you.

> The question I have is how can I access data from other layers? Is
> there
> an interface with getLayers() functionality (I know the DnDCatcher has
> it). I want to update the label based on the data/entities on other
> layers.
>
> I am sorry if this is a basic question.

It's not a basic question - Layers are under no contract to provide a
common interface other than the one used by the MapBean and reacting to
a projection. A Layer may render it's map any way it wants. That
said, the OMGraphicHandlerLayer is a Layer superclass that dictates
that a particular Layer uses OMGraphics.

To get a handle on all of the layers, use the MapHandler to get to the
LayerHandler. The LayerHandler contains all of the layers, whether
they are part of the map or not. You can add your component to the
LayerHandler as a LayerListener, and it will receive LayerEvents when
the map changes. The LayerEvents will provide you with the layers, and
from there you can get access to their data.

Hope this helps,

- Don


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
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 Sat Feb 26 2005 - 07:26:26 EST

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