hello me again,
to solve my problem, i don't install a trackball. i am just changing the values of the map_set_function. i have worked with widgets. so i reached to rotate the map projection by clicking a button, but it only works for one time, because the map projection always starting at the values, which was define by me...so i can't rotate in x-axis and after that in y-axis...hope you understand what i mean and want nad can help me...
That is my code:
PRO experiment2_event, ev
WIDGET_CONTROL, ev.id, GET_UVALUE = eventval
CASE eventval OF
'DRAW_WIN_EVENT': BEGIN
IF ev.press EQ 1 THEN BEGIN
CURSOR, LON, LAT & PRINT, 'X = ', LON, ' Y = ', LAT
ENDIF
END
'Rotate1' : BEGIN
a=-90
REPEAT BEGIN
A=A+1
MAP_SET, (A),-0,10,/ORTHOGRAPHIC,/ISOTROPIC,/GRID,/CONTINENTS,/LABEL,/HORIZON
ENDREP UNTIL A EQ -45
A=A
END
'Rotate2' : BEGIN
b=-0
REPEAT BEGIN
B=B+1
MAP_SET, -90,(B),10,/ORTHOGRAPHIC,/ISOTROPIC,/GRID,/CONTINENTS,/LABEL,/HORIZON
ENDREP UNTIL B EQ 45
END
'exit' : BEGIN
WIDGET_CONTROL, ev.TOP, /DESTROY
END
ENDCASE
END
PRO experiment2
main = widget_base (title='Globus', /column)
btn1 = widget_button (main, value= 'exit', uvalue = 'exit')
btn2 = widget_button (main, value= 'Rotate1', uvalue = 'Rotate1')
btn4 = widget_button (main, value= 'Rotate2', uvalue = 'Rotate2')
draw = widget_draw (main, XSIZE = 500, YSIZE = 500, uvalue='DRAW_WIN_EVENT', /button_ev, /FRAME, RETAIN = 2)
widget_control, main, /realize
xmanager, 'experiment2', main, /no_block
A=-90
B=-0
MAP_SET, A,B,10,/ORTHOGRAPHIC,/ISOTROPIC,/GRID,/CONTINENTS,/LABEL,/HORIZON
END
|