Create geographic globe
geoglobe(
creates a geographic globe in
the specified figure, panel, or tab group. The figure must be created using the parent
)uifigure
function. For information about navigating the globe, see Geographic Globe Navigation.
The geographic globe requires hardware graphics support for WebGL™. For more information, see Tips.
geoglobe(
specifies additional options for the globe using one or more name-value pair arguments.
Specify the options after all other input arguments. For a list of options, see parent
,Name,Value
)GeographicGlobe
.
g = geoglobe(___)
returns a
GeographicGlobe
object. This syntax is useful for controlling the
properties of the geographic globe.
Geographic globes are not supported in the Live Editor or MATLAB Online™.
If multiple windows requiring WebGL are open at once, then the geographic globe may display this error:
Globe Viewer needs to close because the WebGL context has been lost.
The geographic globe requires hardware graphics support for WebGL. To determine if your system has hardware graphics support for WebGL, display axes in a figure created using the uifigure
function. Get renderer info about the axes using the rendererinfo
function. Then, query the GraphicsRenderer
property. Your system has
hardware graphics support if the GraphicsRenderer
property has a
value of
'WebGL'
.
fig = uifigure; ax = axes(fig); info = rendererinfo(ax); info.GraphicsRenderer
ans = 'WebGL'
If you create a geographic globe with no output argument, then you can assign the
globe to a variable later by using the findall
function. If there is
more than one geographic globe, then findall
returns a vector of
globe
objects.
uif = uifigure; geoglobe(uif) g = findall(groot,'Type','globe');
If there is more than one geographic globe, then findall
returns
a vector of globe
objects.
uif = uifigure; geoglobe(uif) uif2 = uifigure; geoglobe(uif2) g = findall(groot,'Type','globe')
g = 2×1 GeographicGlobe array: GeographicGlobe GeographicGlobe