% GUIshowpoint
% Function for the MODIS GUI
% Copyright by Jasmine S Nahorniak, Oregon State University.
% March 14 2000
% called from a line like:
%    set(gcf,'WindowButtonMotionFcn','GUIshowpoint;');


function GUIshowpoint(currentdata);

% remove previous label
delete(findobj('Tag','pointlabel'));

% get current location
currpt=gcpmap; 
lat=currpt(1,1);
lon=currpt(1,2);

% get data value at that location
dataval=ltln2val(currentdata,[length(currentdata(1,:))/360 90 -180],lat,lon);

% print current location on map
hh=textm(lat,lon,[num2str(dataval) ' (' num2str(lat) '^oN, ' num2str(lon) '^oE)']);
set(hh,'Tag','pointlabel');
