% GUIeditl2map
% Function for the MODIS GUI
% Copyright by Jasmine S Nahorniak, Oregon State University. 
% Mar 1 2000

function GUIeditl2map(mapfig);

% north latitude
nlat=str2num(get(findobj('Tag','EditText8'),'String'));
% south latitude
slat=str2num(get(findobj('Tag','EditText9'),'String'));
% west longitude
wlon=str2num(get(findobj('Tag','EditText10'),'String'));
% east longitude
elon=str2num(get(findobj('Tag','EditText11'),'String'));
% center latitude
clat=str2num(get(findobj('Tag','EditText13'),'String'));
% center longitude
clon=str2num(get(findobj('Tag','EditText14'),'String'));

% title
maptitle=get(findobj('Tag','EditText2'),'String');


figure(mapfig)  

% find current map limits
currlims=axis;
currlons=currlims(1:2);
currlats=currlims(3:4);


if slat~=currlats(1) | nlat~=currlats(2) | wlon~=currlons(1) |     elon~=currlons(2),
    axis([wlon elon slat nlat]);
end

hh=title(maptitle,'Color','k');
set(hh,'Tag','Maptitle');

