semantics of DataReferenceImpl.setData(null) ??

I have an web based visad app which is to render as lines, vertices and labels some 'Route' data structure posted by a browser based system. Each 'waypoint' in a route has a lat,lon,name and pointer to 'next
 waypoint.  Lines are to be drawn from a waypoint to its next point.

I have 3 DataReferenceImpls objects attached to a display (J2D). I re-use the display and dataRefs across multiple http calls.

If the Route to be rendered contains a single point, there will be no 'lines' (think Rivers.java from the visad examples). In this case, i use

dataRefForLines.setData( null );

This call appears to play havoc with the overall rendering of the image.
The image includes the initial vertex and label of previously composed Route objects, i.e. it appears that the call affects the other two DataRefs, one which plots vertices (mathtype is index -> LatLonTuple) and one which draws labels (mathtype is LatLonTuple -> TextType.Generic)

If I replace the above call with

dataRefForLines.setData( new Real(0) );

all is well.

I have no idea what is going on. I can post the code if necessary, it may be easier than trying to explain in the abstract. (I did try the display.reAutoScale as per the mail list archives but no change)

Any pointers appreciated.

Stuart Maclean

==============================================================================
To unsubscribe visad, visit:
http://www.unidata.ucar.edu/mailing-list-delete-form.html
==============================================================================


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