% Function for the MODIS GUI.
% Copyright by Jasmine S Nahorniak, Oregon State University. 
% June 26 2000

function [l2lat,l2lon]=GUIgetlatlon(data)

GUIbutton('Pushbutton2','LOADING','on');

l2lon=get(findobj(gcbf,'Tag','PopupMenu1'),'Value');
l2lat=get(findobj(gcbf,'Tag','PopupMenu2'),'Value');

% display region in map box
mainfig=findobj('Name','MODIS GUI');
set(findobj(mainfig,'Tag','EditText8'),'String',num2str(max(max(data{l2lat}))));
set(findobj(mainfig,'Tag','EditText9'),'String',num2str(min(min(data{l2lat}))));
set(findobj(mainfig,'Tag','EditText10'),'String',num2str(min(min(data{l2lon}))));
set(findobj(mainfig,'Tag','EditText11'),'String',num2str(max(max(data{l2lon}))));

GUIbutton('Pushbutton2','GO','off');

close(gcbf);
