Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

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
==============================================================================


 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690