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

From: Don Dietrick <dietrick_at_bbn.com>
Date: Wed, 10 Jun 2009 16:24:46 -0400

Hi Greg,

I'm not sure why the second doPrepare() would fix anything. Are you
using the standard OpenMap application, and you know the layer has
been added to the MapBean? Can you send me the layer code?

- Don

On Jun 10, 2009, at 8:58 AM, Greg Jewell wrote:

> Hi Don,
>
> Thanks for responding to my question. I'm pretty much doing things
> as you described below. I have extended OMGraphicHandlerLayer, but
> all I am doing in it is changing the traversal mode and setting my
> own OMGraphicList. I am not overriding the prepare() method of the
> layer. The graphic list changes the traversal mode, doesn't allow
> duplicates, and overrides the _add method so that graphics are
> inserted at different places in the list.
>
> At some later point, OMGraphics are added to the list. Once the
> graphics are inserted, a call to doPrepare() is made. (I called the
> object a layerHandler in my previous message -- sorry for the
> confusion.) It is at this point where I sometimes need to make
> consecutive calls for the graphics to be rendered.
>
> I also have two other unrelated questions that I will post in
> another message. I don't want to pollute this thread because the
> questions may be lost.
>
>
> Thanks again,
> Greg
>
>
> On Tue, Jun 9, 2009 at 8:30 PM, Don Dietrick <dietrick_at_bbn.com> wrote:
> 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 Wed Jun 10 2009 - 16:25:27 EDT

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