Re: set range outside invisible

Hi Jacky,

>I am trying to extend the spreadsheet class so that the user can select a 
>location to zoom into, for instance a map of Europe is shown and if user 
>selects South England it will zoom into that particular location. My question 
>is two fold, firstly what method actually sets the range. I have checked 
>GMCWidget and other widgets such as ContourWidget but not found what I want. 
>Maybe I have overlooked I am not sure.

If by "zoom in" you mean simulate a Shift+left mouse drag
action, then you'll need to grab the ProjectionControl from
the display and change the projection matrix.  See
examples/Test57 for a program that programmatically alters
the projection matrix.

If you mean "zoom in" by changing the scale (so that your
data "grows" and fills up more of the white-outlined box),
you'd accomplish that by calling setRange on the spatial
ScalarMaps.  See examples/Test26 for a program that
programmatically alters the scale.

>Secondly I would like to know if there is a way to make sure what is outside 
>the range is invisible. I have imported the Europe map and have used the 
>widget that automatically pops up in SpreadSheet to changed the range for 
>Xaxis and Yaxis so that it seems to be zooming into a particular location. 
>However if I do this I get the a map which covers not just the range but 
>outside it too. I have read the VisAD tutorial in section 2.5 and it asks me 
>to select ScalarMap with SelectRange as DisplayRealType then it should solve 
>my problem. But I don?t know how to make use of this in SpreadSheet.

You can do a SelectRange in the SpreadSheet by choosing
"Edit mappings..." from the Cell menu and mapping one of the
RealTypes to "Select Range" (in the bottom right-hand corner
of the DisplayRealTypes).  A new widget will appear in the
widget panel that allows you to alter the visible range of
the data.

-Curtis


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