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 Gunnar, > I've created a user interface wrapping the display and some of its Maps > such as Color, Alpha, Contour etc. The user should be able to turn these > maps on and off as he pleases. I could however, not find a method for > removing a map from the display. The only way I could find was to call > DisplayImpl.clearMaps() and re-add the others afterwards. The clearMaps() > method could only be called when the datareference vector is empty. > > What I had to do is then, remove all references from the display, clear all > maps, add all but the one map, add all references back again. This seems to > be rather inefficient. Is there another way of doing this a bit more > smoothly? I'm afraid that's what you have to do. However, you can write a method, perhaps with signature: public static void addMap(DisplayImpl display, ScalarMap map)l that hides all this logic from applications. Cheers, Bill ---------------------------------------------------------- Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI 53706 hibbard@xxxxxxxxxxxxxxxxx 608-263-4427 fax: 608-263-6738 http://www.ssec.wisc.edu/~billh/vis.html
visad
archives: