worldwind-react-globe-bs4
React Bootstrap UI components for the worldwind-react-globe 3D globe component, featuring:
- Customizable NavBar menu with mobile support
- Layer manager for base layers and overlays
- Marker palette and marker manager
- Place name search
- Settings manager
Install
npm install --save worldwind-react-globenpm install --save worldwind-react-globe-bs4
Example
import React Component from 'react'import Globe from 'worldwind-react-globe'import CardColumns Collapse Container from 'reactstrap'import LayersCard MarkersCard NavBar NavBarItem SearchBox SettingsCard Tools from 'worldwind-react-globe-bs4' import './App.css' { thisstate = lat: 342 lon: -1192 alt: 10e6 globe: null thisglobeRef = React thislayersRef = React thismarkersRef = React thissettingsRef = React } { // Get the component with the WorldWindow after mounting this } { const globe = thisglobeRefcurrent const layers = layer: 'blue-marble' options: category: 'base' enabled: false layer: 'blue-marble-landsat' options: category: 'base' enabled: false layer: 'eox-sentinal2' options: category: 'base' enabled: false layer: 'eox-sentinal2-labels' options: category: 'base' enabled: true layer: 'eox-openstreetmap' options: category: 'overlay' enabled: false opacity: 08 layer: 'renderables' options: category: 'data' enabled: true displayName: 'Markers' layer: 'compass' options: category: 'setting' enabled: false layer: 'coordinates' options: category: 'setting' enabled: true layer: 'view-controls' options: category: 'setting' enabled: true layer: 'stars' options: category: 'setting' enabled: false layer: 'atmosphere-day-night' options: category: 'setting' enabled: false const navbarItems = <NavBarItem ='lyr' ='Layers' ='list' =/> <NavBarItem ='mkr' ='Markers' ='map-marker' =/> <NavBarItem ='set' ='Settings' ='cog' =/> const navbarSearch = <SearchBox =/> return <div> <NavBar ='' ='worldwind-react-globe-bs4' ='https://github.com/emxsys/worldwind-react-globe-bs4' = = /> <Container ='p-0'> <div ='globe'> <Globe = =/> </div> <div ='overlayTools noninteractive'> <Tools = = ='Markers'/> </div> <div ='overlayCards noninteractive'> <CardColumns> <LayersCard = = = /> <MarkersCard = = ='Markers' /> <SettingsCard = = = /> </CardColumns> </div> </Container> </div> }
License
MIT © Bruce Schubert