NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
Hi Stuart- Stuart Maclean wrote:
Hi Don, many thanks for the speedy reply.
Well, it was either that or write performance evaluations. Helping users is much more rewarding. ;-)
I build a Mercator projection, and set its defaultMapArea with a ProjectionRect (cartesian values, i.e. projected from the lat,lon). I then construct a MapProjectionDisplay and call setMapProjection.
That's the best way to do it.
I have got it all working. This was actually a sort of red herring. I wasn't seeing any Displayables show up, and I was erroneously assuming that my projection logic was wrong. So I looked at the main method in the MapProjectionDisplay (was a life saver, thanks for including it!). I wasn't ever calling the 'draw' method, doh!
Yeah, that draw command used to get me all the time.too! That's kind of left over from the old VisAD days when anything you did to a display caused a redraw. The idea was that you could create the DisplayMaster, add all the displayables, then call draw() which would render everything. These days, you can add and remove displayables with much less overhead. In the IDV, we use the ViewManager classes (wrapper around a DisplayMaster) to call draw so in most cases it's "automatic". Don ************************************************************* Don Murray UCAR Unidata Program dmurray@xxxxxxxxxxxxxxxx P.O. Box 3000 (303) 497-8628 Boulder, CO 80307 http://www.unidata.ucar.edu/staff/donm *************************************************************
idvdevelopers
archives: