Re: [OpenMap Users] Using GraphicLoader classes to track many objects

From: Don Dietrick <dietrick@bbn.com>
Date: Thu Jan 16 2003 - 11:56:57 EST

Hi Pat,

To add a GraphicLoader to the application, you should just add it to
the MapHandler. This can be done by adding it to the
openmap.components property. Make sure that you are also adding a
GraphicLoaderConnector to the openmap.components property, too (and do
that before your GraphicLoader).

The GraphicLoaderConnector will automatically find your GraphicLoader,
and create/configure a GraphicLoaderPlugIn/PlugInLayer for you, and add
it to the map.

You can add the AnimationTester this way, too.

The GraphicLoader will receive the projection that is set in the
GraphicLoaderPlugIn, so you can use the projection object to figure
out if any updates to the OMGraphic affect the map, and then you can
react accordingly.

Hope this helps,

Don

On Thursday, January 16, 2003, at 11:25 PM, Pat Rundall, NØHR wrote:

>> If you need to update the map when the locations move, I'd take a look
>> at the com.bbn.openmap.plugin.graphicLoader package, and use a
>> GraphicLoader to manage your OMGraphics and drive your map.
>
> Many thanks (again!) for the advice, Don.
>
> However, as an Openmap newbie, I'm struggling a bit with the
> graphicloader
> package. It certainly does look to be just what I need based the
> documentation
> I've read, however, without an example, I'm still scratching my head.
> Searches
> through the email archives also did not find anything on this
> (powerful?)
> package.
>
> As an example, to track car objects on a map, I suppose that a
> carlayer is
> in
> order. So, I add the following to my .properties file:
>
> car.class=com.bbn.openmap.plugin.PlugInLayer
> car.prettyName=Car
> car.plugin=com.bbn.openmap.plugin.graphicLoader.GraphicLoaderPlugIn
>
> This, by itself, doesn't do anything, but I'm guessing
> that it's required to get GraphicLoader going. Right?
>
> My goal is to develop a simple vehicle tracking system
> (I'm sure I'm not the first and won't be the last). I'm
> going to try to setup a stream (serial port?) of data,
> reformat it into something meaningful ("car #21 is now
> located: 42.44,-90.21 and should use icon: foo.bmp"). Perhaps
> SQL should come into play here, so that only those cars
> on the screen are updated, rather than every car in the world.
> Why process it if it's not visible, right? However, we want
> to store/update that info in case the user "zooms out".
>
> Anyway, I'm guessing that with the properties file modifications
> above, I'll need to set a loader. As a test, I added an
> additional line to the properties file:
>
> car.plugin.loader=com.bbn.openmap.plugin.graphicLoader.AnimationTester
>
> hoping that it would shed some light. The car layer (as I've
> got it now), doesn't really do anything as far as I can tell
> other than maybe draw a small triangle some variable length of
> time after I've done a navigation-mode rightclick.
>
> Any and all advice toward building this would be appreciated!
>
> Pat
>
> --
> [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, 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 Thu Jan 16 11:57:18 2003

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