Re: What makes 2 ScalarMaps the same?

Doug,

  Hey, you're first in line!  

  This is driving me crazy...my program worked and then it stopped
working.  I should have gone to lunch when it worked :)

  When it did work, I was getting two X axes and two Y axes (when
superimposing 2 data sets).  Go figure.

  Re: adding the same map twice...each pass I make a new map (new as in
"valueMap = new ScalarMap(...)").  That's why I find the exception
perplexing.

  Thanks for your help, though.  I'll go through the code again and see
what's not right.

p



Doug Lindholm wrote:
> 
> I was going to reply, but I figured someone would beat me to it since I
> get these messages later than most. Just watch, someone will beat me to
> this one. :-)
> 
> A Display keeps track of the ScalarMaps that have been added to it. If
> you have already mapped Time to the XAxis, not only are you not allowed
> to add the same (logical) mapping again, you don't NEED to. Once that
> Map has been added to the Display, ANY Data that you have added to the
> Display that has Time as part of its MathType will be mapped
> automagically!
> 
> The other issue is how to avoid adding the same map twice. See if you
> can do that in your program logic. Otherwise, you could try and catch a
> BadMappingException.
> 
> Regards,
> Doug
> 
> Paul Gifford wrote:
> >
> > Hi,
> >
> >   I asked this as a followup question but maybe it was overlooked.  I'm
> > getting this exception:
> >
> > visad.BadMappingException: Display.addMap: two ScalarMaps with the same
> > RealType & DisplayRealType
> >
> >   I have a loop that is going through a vector of data sets.  Each pass
> > new ScalarMaps are being created...the maps are local to the loop.  I
> > know you can't reuse a ScalarMap but I though creating new ones each
> > pass would do the trick.  I guess I thought wrong...any suggestions?
> >
> > p
> >
> > ------------------------
> > Paul Gifford, Capt, USAF
> > NOAA/NGDC
> > 325 S Broadway EGC2
> > Boulder CO 80303
> >
> > 303-497-6556 voice
> > 303-497-6513 fax
> 
> --
> *----------------------------------------------------------------------*
> | Doug Lindholm, Software Engineer          |  E-mail: lind@xxxxxxxx   |
> | Research Applications Program             |   Phone: 303-497-8374    |
> | National Center for Atmospheric Research  |                          |
> | P.O. Box 3000                             |     There's no place     |
> | Boulder, Colorado 80307-3000              |        like $HOME        |
> *----------------------------------------------------------------------*

-- 

------------------------
Paul Gifford, Capt, USAF
NOAA/NGDC
325 S Broadway EGC2
Boulder CO 80303

303-497-6556 voice
303-497-6513 fax


  • 2000 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: