Re: [OpenMap Users] Layer dosen't "update" after call to MapBean.setCenter(lat, lon)

From: Davidian <>
Date: Thu, 31 Jan 2008 07:26:27 -0800 (PST)


You might be on to something. Until now, I hadn't considered that I was
making two consecutive. calls that would fire a ProjectionChangedEvent.

Before trying your idea of placing a sleep between the setCenter() and
setScale() calls, I decided to reverse the order they were called in to see
if it would have any effect. It did! The behavior I described before
stopped happening. It's the most scientific solution, but it seems to work
in this case.

If anyone has a more concrete reason this happens, or a more definitive way
to solve this problem, I am all ears.


oland wrote:
> Sounds like a threading problem then. Each of the projection change
> events triggers doPrepare that launches a new thread that calls prepare
> so it is very likely that your prepare method etc could be run
> simultaneously (e.g., multi core box). Try putting in a small sleep
> between setCenter & setScale to verify this. If that works fix the
> threading problem in your layer.
> BR
> Carsten

View this message in context:
Sent from the OpenMap mailing list archive at
[To unsubscribe to this list send an email to ""
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Thu Jan 31 2008 - 10:26:50 EST

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