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
Davidian wrote:
> Carsten,
>
> Yes, I've confirmed that the layer is getting a ProjectionChanged event
> every time I call setCenter. As a matter of fact, it looks like it is
> getting two such events. I'm sure that is because I am calling setCenter()
> on the MapBean, and then following that with setScale().
>
> Also, I am extending OMGraphicHandlerLayer. I checked the code in that
> class, and generate() is getting called for sure in the prepare() method.
>
> Thanks for your help so far.
>
> -Kennedy
>
>
>
> oland wrote:
>
>> Hi
>>
>> Does the layer receive a projection change event after the call to
>> setCenter?
>>
>> Override prepare and check that generate is called on the list returned
>> by getList() and that the list is not empty when this is done.
>>
>> BR
>> Carsten
>>
>>
>>
>
>
--
[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 Thu Jan 31 2008 - 09:05:14 EST