Skip to content

worldwind-ui API / react-worldwind / Globe

Function: Globe() ​

Globe(props): Element

Defined in: react/src/Globe.tsx:141

Renders a WorldWind globe. Creation options (layers, view, elevation, ...) apply on mount; projection and the event handlers are reactive. Children render inside an overlay above the canvas once the globe is ready, with the globe available through context.

Give the element a height (via className or style); the canvas fills it. *

Parameters ​

props ​

GlobeProps

Returns ​

Element

Example ​

tsx
<Globe style={{ height: 480 }} layers={['blue-marble-landsat', 'atmosphere']} view={{ latitude: 40, longitude: -74, range: 2e6 }}>
  <RenderableLayer name="Cities">
    <Placemark position={{ latitude: 40.7128, longitude: -74.006 }} label="New York" />
  </RenderableLayer>
  <LayerSwitcher />
</Globe>

MIT licensed. Not affiliated with NASA; WorldWind is NASA's open-source virtual globe.