function slid=astGeoidSlider(geoidcanvas2D)
% astGeoidSlider: this is a helper function for astvrViewGeoidHeight to
% create a UI slider

%   Copyright 2011 The MathWorks, Inc.

slid = uicontrol('Style','slider','Units','normalized','Position',...
    [geoidcanvas2D.Position(1)+geoidcanvas2D.Position(3)*.15
    geoidcanvas2D.Position(2)*.1
    geoidcanvas2D.Position(3)*.85
    geoidcanvas2D.Position(2)*.8],...
    'Value',0,'Callback','geoidGrid.height = get(slid,''Value'')*actualHeights;');

% Slider Text
uicontrol('Units','normalized','Position',...
    [geoidcanvas2D.Position(1)
    geoidcanvas2D.Position(2)*.1
    geoidcanvas2D.Position(3)*.15
    geoidcanvas2D.Position(2)*.8],...
    'String','Magnify','Style','text','FontUnits','normalized',...
    'FontSize',0.7,'HorizontalAlignment','left');