Hi F.SITBON,
On Monday, September 24, 2001, at 03:30 AM,
Frederic.SITBON@fr.thalesgroup.com wrote:
> As far as i understood the Openmap architecture, all openmap
> informations
> are known by the proporties file (or properties declaration in a
> program).
This is true for initialization. Components can be added or removed
from the application on the fly if you want. This capability is not
currently in the OpenMap application, but the architecture, using the
BeanContext, makes it really easy to do. The next release of OpenMap
will have support built in to add layers on the fly (We've incorporated
Kai Lessmann's code, with some modifications).
> For test purpose i'd like to dynamicly add data (OMGraphics) in a
> LocationHandler inside the program and not in properties or class
> declaration.
Data on layers has always been able to be dynamic. The Layers are
pretty independent and can present anything they want to on the map, at
any time.
> So is it possible to acces to locationlayerhandler instance ?
There doesn't seem to be a way to get a handle on a LocationHandler from
a LocationLayer. This needs to be updated, and the LocationLayer needs
to be updated to provide BeanContext access to the LocationHandlers.
> The way I use LocationHandler in my program (without
> openmap.properties):
>
> LocationLayer locationLayer1 = new LocationLayer();
> LayerHandler layerHandler1 = new LayerHandler();
> MapBean mapBean1 = new MapBean();
> Properties properties3 = new Properties();
>
> properties3.put("loc.prettyName", "Location");
> properties3.put("loc.locationHandlers", "handler1");
> properties3.put("handler1.class",
> "com.bbn.openmap.layer.location.BasicLocationHandler");
>
> locationLayer1.setProperties("loc", properties3);
> layerHandler1.addLayer(locationLayer1);
> layerHandler1.addLayerListener(mapBean1);
>
> This code works fine but all data are defined in the
> BasicLocationHandler. I
> can't add OMGraphigs "on the fly"
This sounds like you are piecing things together yourself, so you should
be able to get an inital handle on a LocationHandler. The
LocationHandler is an interface, so you can create it to get it's data
any way you want. The BasicLocationHandler is not written to have data
added dynamically, however, which is why you can't do that. You just
have to change what gets added to the graphics vector in the get()
method. How that happens is up to you.
Cheers,
Don
>
> Thanks for help
>
> F.SITBON
>
> --
> [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"]
>
>
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Donald F. Dietrick, dietrick@bbn.com
BBN Technologies, 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 Mon Sep 24 15:54:26 2001
This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:31 EDT