Re: [OpenMap Users] Sometimes have to call layerHandler.doPrepare() twice

From: Don Dietrick <dietrick_at_bbn.com>
Date: Tue, 09 Jun 2009 20:30:51 -0400

Hi Greg,

I'm assuming by layer handler you mean layer that extends
OMGraphicHandlerLayer (just let me know if you mean something else).
Have you overridden your prepare() method, and how are you loading the
list into the layer before calling doPrepare?

You probably want to create a new OMGraphicList, add your OMGraphics to
it, and then call layer.setList(omGraphicList). Then call
layer.doPrepare().

Since you are modifying the list outside of the prepare method, it
sounds like you don't want to modify the list in prepare(). Therefore,
you really don't need to override the prepare() method at all. By
default, it just generates the OMGraphicList set on it.

Hope this helps,

- Don

Greg Jewell wrote:
> Hello,
>
> I am new to OpenMap, so please forgive me if I am missing something
> fundamental. I am attempting to load a graphic list on the layer
> handler with potentially many graphics. These graphics may be any
> combination of vectors and rasters. Sometimes, after I am done
> loading the list, the call to layerHandler.doPrepare() doesn't display
> what I just loaded. If I add a second call to doPrepare() immediately
> after the first, everything seems to be drawn correctly.
>
> This looks like a timing issue, but I'm not certain. Any insight
> would be appreciated.
>
> Thanks,
> Greg

--
[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 Tue Jun 09 2009 - 20:31:26 EDT

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