« Return to Thread: Layer dosen't "update" after call to MapBean.setCenter(lat, lon)

RE: Layer dosen't "update" after call to MapBean.setCenter(lat, lon) (UNCLASSIFIED)

by Lackey, Michael B. (AMRDEC/BTI) :: Rate this Message:

| View in Thread

Classification:  UNCLASSIFIED
Caveats: NONE

It's ironic that you should mention this, because I am seeing a similar
problem.  My problem appeared a couple days ago during testing.

I have an application that displays DTED and RPF data, and I am seeing a
similar behavior (layers not painting) when I open a "project".  Opening
a "project" involves enabling/disabling the layers and then setting map
center and scale.  It happens more frequently when the Jframe (map bean
container) opens "maximized" and the map scale is very large,
1:1,000,000, zoomed way out.  If the maps open with a smaller scale, say
1:500,000 or 1:250,000, the problem occurs much less frequently.  It is
usually the RPF layer that does not paint, but ocassionally it is our
custom layer that does not. It appears to be a one-time thing:  forcing
a repaint (panning the map, dragging an object) usually causes all
layers to repaint correctly, and after that the problem seems to
disappear.

It is very repeatable.  First, I set map scale to a small value (zoomed
in) such as 1:75,000.  Then open a "project" with the Jframe "maximized"
and map scale set to 1:1,000,000.  If I comment out the function call
that sets center/scale, and the problem usually disappears.  If I
uncomment the line, the problem usually reappears.

My SWAG is some timing issue, based on the observation that painting to
a 1920x1200 display at 1:1,000,000 scale consumes much more CPU time
than painting the same data at 1:500,000 scale.  I've not yet been able
to dig into this, it has not yet bubbled to the top of the list, but
will keep you posted if/when I uncover the issue.  Please do the same.

Mike Lackey

-----Original Message-----
From: owner-openmap-users@... [mailto:owner-openmap-users@...]
On Behalf Of Davidian
Sent: Wednesday, January 30, 2008 1:07 PM
To: openmap-users@...
Subject: [OpenMap Users] Layer dosen't "update" after call to
MapBean.setCenter(lat, lon)


Ok, I want to specify that this doesn't always happen, but sometimes it
does.
It appears that this behavior occurs mostly when I first open the
application and there are not many items in the layer's OMGraphicList.

Anyway, my setup:

1) I have an OMGraphicHandlerLayer which I do NOT set the
ProjectionChangePolicy for (defaults to StandardPCPolicy).

2) When I pan the map around with PanMouseMode or ZoomMouseMode,
everything updates correctly and display properly.

3) However, when I change the display by calling MapBean.setCenter(lat,
lon,
zoom) there are times when the OMGraphics are not displayed until I
manually change the projection by zooming in or out.  I can regularly
reprocude this behavior.

Anyone have any ideas?  If you need more info, let me know.  I have
tried various things, but nothing seems to fix this.  I love OpenMap,
but this is getting frustrating.

Thanks,

Kennedy
--
View this message in context:
http://www.nabble.com/Layer-dosen%27t-%22update%22-after-call-to-MapBean
.setCenter%28lat%2C-lon%29-tp15189506p15189506.html
Sent from the OpenMap mailing list archive at Nabble.com.

--
[To unsubscribe to this list send an email to "majdart@..."
with the following text in the BODY of the message "unsubscribe
openmap-users"]
Classification:  UNCLASSIFIED
Caveats: NONE

--
[To unsubscribe to this list send an email to "majdart@..."
with the following text in the BODY of the message "unsubscribe openmap-users"]

 « Return to Thread: Layer dosen't "update" after call to MapBean.setCenter(lat, lon)