Re: Drawing tool problem

From: Donald Dietrick <dietrick@bbn.com>
Date: Tue Sep 17 2002 - 12:18:53 EDT

Hi Bart,

It's not a stupid question, it's a problem with how the
OMDrawingToolLauncher is implemented and how it expects to be added to
a MapHandler. It doesn't get information from the OMDrawingTool about
what loaders are available, it expects to gather it's own information
from the MapHandler on its own. There isn't a way to add laoders to it
directly, either.

If you create a MapHandler, and just add everything to it, everything
will hook up normally. The OMDrawingToolLauncher should be changed,
though, to work as expected - getting the list of loaders from the
OMDrawingTool.

- Don

On Tuesday, September 17, 2002, at 12:03 PM, Bart Jourquin wrote:

> Hi,
>
> This may be a stupid question, but I can't figure out what is wrong
> for the moment. I just try to add a drawing tool and layer to my app:
>
>
> // Create drawing tool and add Point and Line types
> OMDrawingTool drawingTool = new OMDrawingTool();
> drawingTool.addLoader(new OMPointLoader());
> drawingTool.addLoader(new OMLineLoader());
>
> // Create the launcher and associate the drawing tool
> OMDrawingToolLauncher omDrawingToolLauncher = new
> OMDrawingToolLauncher();
> omDrawingToolLauncher.setDrawingTool(drawingTool);
>
> // Create a drawing layer
> DrawingToolLayer drawingToolLayer = new DrawingToolLayer();
> Properties p = new Properties();
> p.setProperty("DrawingLayer.prettyName", "Drawing layer");
> drawingToolLayer.setProperties("DrawingLayer", p);
> drawingToolLayer.setDrawingTool(drawingTool);
> // Associate all this with the mapHandler
> mapHandler.add(drawingToolLayer);
> mapHandler.add(omDrawingToolLauncher);
>
>
> When this is done, the "Graohic Type" combo of the drawing tool
> launcher dialog remains empty.
> What did I miss?
>
> Many thanks
>
> --
> Prof Dr Bart Jourquin
> F.U.Ca.M. - G.T.M.
> Chaussée de Binche, 151a
> B7000 Belgium
> Tel. : +32 65 323293
> Fax. : +32 65 315691
> http://message.fucam.ac.be/~jourquin
>
>
> --
> [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"]
>
>

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
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 Tue Sep 17 12:17:30 2002

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