Re: [OpenMap Users] refreshing layers?

From: Don Dietrick <dietrick_at_bbn.com>
Date: Wed, 24 Aug 2005 10:44:01 -0400

Hi Carmen,

 From the RouteLayer, you can use the MapHandler to find the MapBean,
which is where you want to set the projection. You can override the
findAndInit(Object) method of Layer, and test the Object for an
instance of the MapBean. When you find it, save a handle to it, and
when your timer goes off, change the center of the projection on the
MapBean (MapBean.setCenter(...)) to the location of your OMPoint.
The map should move, and all layers should react to that.

Don't forget to call super.findAndInit(Object) in your overridden
method.

Cheers,

Don


On Aug 17, 2005, at 4:00 PM, nemrac98_at_twcny.rr.com wrote:

> Hi all!
>
> I am working with the SimpleMap2 and RouteLayer example. I have added
> to the route layer a timer that moves a OMPoint across the map. When I
> display the map however the point shows up in one location and does
> not move until I change the projection(zoom in or out etc.). How can I
> automatically make it change the projection from the RouteLayer. I can
> use fireProjectionChange() but the MapBean is in SimpleMap2. What
> should I call from my Timer method to make the projection refresh with
> the new location of my point?
>
> Any help would be greatly appreciated!
>
> Thanks Everyone!
>
> Carmen
>
> --
> [To unsubscribe to this list send an email to "majdart_at_bbn.com"
> with the following text in the BODY of the message "unsubscribe
> openmap-users"]
>



=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Don Dietrick, dietrick_at_bbn.com
BBN Technologies, Cambridge, MA
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Wed Aug 24 2005 - 10:44:26 EDT

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:07 EDT