Due to the current gap in continued funding from the U.S. National Science Foundation (NSF), the NSF Unidata Program Center has temporarily paused most operations. See NSF Unidata Pause in Most Operations for details.
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: