Re: Help with properties files..

From: Don Dietrick <dietrick@bbn.com>
Date: Sun Mar 17 2002 - 21:13:20 EST

Hi Ed,

The marker name has limited. In the OpenMap application, the
LayerHandler knows it only for a short instant, when it uses the
property to figure out what class to create. After that, only the layer
uses the marker name, in order to scope which properties belong to it
(the LayerHandler tells it what the prefix is). The LayerHandler is the
object that is holding on to all the layers, whether or not they are on
the map.

You can ask the layer what it's marker name is (Layer.getMarker(), or
Layer.getPropertyPrefix()). If you know what the marker name is
programmatically, you could use the BeanContext to get the LayerHandler,
get the layer array, and then search the array for the layer with the
prefix you are looking for. You could also use the layer GUI name
(prettyName property), but that's up to you.

Hope this helps,

Don

On Sunday, March 17, 2002, at 07:59 PM, Ed MacKerrow wrote:

> Hi All,
>
> I am having trouble getting a handle of the objects loaded by a
> properties
> file. If, for example, I instantiate a Class of type ShapeLayer, with
> marker name "airport", how would I reference this class from elsewhere
> (another class)?
>
> airport.class=com.bbn.openmap.layer.shape.ShapeLayer
> airport.prettyName=Airports
> airport.shapeFile=data/layers/airprtx020.shp
> airport.spatialIndex=data/layers/airprtx020.ssx
> airport.lineColor=ffff6600
> #airport.fillColor=BDDE83
>
>
> Would OMGraphics omgObjects = airport.computeGraphics(); I am having
> trouble with the properties files and understanding what objects are
> actually being instantiated and where are they residing?
>
> Thanks for the help.
>
> ed
>

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Don Dietrick, dietrick@bbn.com
BBN Technologies, Cambridge, MA
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

--
[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 Sun Mar 17 21:13:47 2002

This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:32 EDT