Re: SV: [OpenMap Users] OMScalingRaster continued

From: Don Dietrick <dietrick_at_bbn.com>
Date: Mon, 13 Sep 2004 09:40:58 -0400

Then I'd check to make sure that the OMScalingRaster you are generating
in projectionChanged() is the same one you are painting...

- Don

On Sep 13, 2004, at 8:06 AM, Marklund David wrote:

> Been there, done that...
>
> Unfortenately the change from regenerate to generate does not change
> the behaviour.
>
> //
> David
>
>
> -----Ursprungligt meddelande-----
> Från: Don Dietrick [mailto:dietrick_at_bbn.com]
> Skickat: den 10 september 2004 13:48
> Till: Marklund David
> Kopia: openmap-users_at_bbn.com
> Ämne: Re: [OpenMap Users] OMScalingRaster continued
>
> Hi David,
>
> You want to call generate() when the projection changes, not
> regenerate(). generate() forces the OMGraphic to look at the
> projection and reposition itself, regenerate() calls generate() only if
> the OMGraphic thinks its parameters have changed. regenerate() is
> something you use when you change position of some of your OMGraphics
> and the projection hasn't changed, so only those OMGraphics that have
> changed actually bother doing anything.
>
> - Don
>
> On Sep 10, 2004, at 3:40 AM, Marklund David wrote:
>
>> Hi all,
>> I have a layer with a OMScalingRaster.
>> The raster seems not to follow the other layers projection changes
>> accurately. I have a pixel in the layer that I can follow when zooming
>> and panning, and that pixel does not follow the other layers.
>>
>> openmap.Projection=mercator
>>
>>
>> This is the code that creates the raster:
>>
>> ---8<---
>>
>> LatLonPoint lr = itsProjection.getLowerRight();
>> LatLonPoint ul = itsProjection.getUpperLeft();
>> omRaster = new OMScalingRaster(ul.getLatitude(),
>> ul.getLongitude(), lr.getLatitude(),
>> lr.getLongitude(),
>> image.image);
>>
>>
>> omRaster.generate(itsProjection);
>>
>> --->8---
>>
>> This is the projectionChanged method of the layer
>>
>> ---8<---
>> public void projectionChanged(ProjectionEvent e) {
>>
>> itsProjection = e.getProjection();
>> if ((e.getProjection() != null) && (omRaster != null)) {
>> omRaster.regenerate(e.getProjection());
>> }
>>
>> repaint();
>> fireStatusUpdate(LayerStatusEvent.STATUS_UPDATE);
>> }
>> --->8---
>>
>>
>> Any ideas anyone ?
>>
>> //David
>>
>> --
>> [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
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>
>


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
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 Mon Sep 13 2004 - 09:42:52 EDT

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