Re: [OpenMap Users] Swapping OMGraphicLists

From: Don Dietrick <dfdietrick_at_gmail.com>
Date: Mon, 22 Aug 2011 21:44:21 -0400

Hi Tony,

I would add both lists to the layer's OMGraphicList, and then maintain
a handle on each set. Then, set visibility on either list as needed.
You might need to call generate() and repaint() on your layer after
the change.

But if they are large lists and you want to keep things the way they
are and minimizing the number of OMGraphics on the main list, trying
calling generate(projection) on the newly visible list and repaint()
after that. That might explain the problem where you can't see either
list.

For seeing both lists, I would check what you are doing in your
prepare() method, reacting to projection changes of the map. My guess
is that something is happening there where both lists get added at the
same time with visibility set to true.

If you want to send me your layer code I'll take a quick look at it.
Hope this helps,

Don

On Mon, Aug 22, 2011 at 3:59 AM, Tony Vasile <avasile_at_csc.com.au> wrote:
> I have two sets of symbols I wish to display on my window. I want to be able
> to swap between the two symbol sets. My first attempt was to set the list in
> my OMGraphicHandlerLayer to one of the lists and when the message comes in
> to swap the lists I set the current list to the other OMGraphicList and make
> it visible by using setVisible and making the old current list invisible by
> using setVisible(false) on it. Currently I am seeing either both sets of
> symbols or no symbols. Does any one have any ideas how I can achieve my
> goal?
>
> Tony Vasile
> Senior Software Engineer
> CSC
>
> Level 3B, 26 Talavera Road Macquarie Park NSW 2113 Australia
> GBS | p: +61 2 9034 2404 | f: +61 2 9034 2398 | avasile_at_csc.com |
> www.csc.com
>
>
> Please consider the environment before printing this e-mail.
>
> CSC - This is a private message. If you are not the intended recipient,
> please delete without copying and kindly advise us by e-mail of the mistake
> in delivery.  Note: Regardless of content, this e-mail shall not operate to
> bind CSC to any order or other contract unless pursuant to explicit written
> agreement or government initiative expressly permitting the use of e-mail
> for such purpose • CSC Australia Pty Limited; Registered Office: 26 Talavera
> Road, Macquarie Park NSW 2113 Australia; Incorporated in Australia ACN: 008
> 476 944
>

--
[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 Mon Aug 22 2011 - 21:47:02 EDT

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