Hi Sunny,
You have a number of options here, and most of them involve getting
access to the MapHandler. Once you have the MapHandler, you can pretty
much get to any component.
Using the MapHandler, you can location the LayerHandler, get it's
layers, and iterate through them to find your layer.
Alternatively, the Layer class has a property, addToBeanContext, that
is false by default (layers are isolated from the MapHandler by
default). If you set that to true in the properties file, the layer
will be added directly to the MapHandler, and you can iterate through
the MapHandler objects to find your layer.
You could have your back-end create the layer and add it to the
MapHandler, where the LayerHandler will pick it up to add it to the map
(if it's visible). You wouldn't need to define layer properties for it
at all in that case.
Lastly, with the next version of OpenMap due out shortly, the
com.bbn.openmap.plugin.graphicLoader.GraphicLoader interface has been
formally defined as an object that provides OMGraphics on it's own
schedule (the graphicLoader package and pilot package have been
adjusted accordingly). If a GraphicLoader (which is what your back-end
basically is) gets added to the MapHandler (say, by defining it in the
openmap.components property or whatever), the LayerHandler has been
updated to create a GraphicLoaderPlugIn/PlugInLayer combination to
display its graphics.
Hope this helps,
Don
On Wednesday, September 4, 2002, at 11:28 AM, Shih-Hung Lin wrote:
> Hi, Group,
>
> I am new to OpenMap development and wish someone here would help me
> with some basics. I am currently working on a new layer with dynamic
> objects which reflects the state of a real-time back end. So far I
> have those objects static displayed on the layer. I use
> "openmap.properties" as following to define the layer and it show up
> as I expected.
>
> openmap.layers=..... dynamic .....
> :
> :
> dynamic.class=com.xyz.layer.DynamicLayer
> dynamic.prettyName=Dynamic Objects
> :
>
> In order to move them, I need to grab a reference to the layer. I
> wonder if there is a standard way to get references to individual
> layers defined in property file.
>
> -Sunny
>
>
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Don Dietrick, BBN Technologies, dietrick@bbn.com
10 Moulton Street, Cambridge, MA 02138
617-873-3031 [fax]-2794
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-- [To unsubscribe to this list send an email to "majdart@bbn.com" with the following text in the BODY of the message "unsubscribe openmap-users"]Received on Wed Sep 4 12:18:27 2002
This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:33 EDT