Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/worldwindearth/worldwind-react-globe-bs4

React UI components for the Web WorldWind virtual globe SDK from NASA and ESA made with Bootstrap 4
https://github.com/worldwindearth/worldwind-react-globe-bs4

bootstrap bootstrap4 esa nasa nasa-worldwind react-components worldwind

Last synced: about 1 month ago
JSON representation

React UI components for the Web WorldWind virtual globe SDK from NASA and ESA made with Bootstrap 4

Awesome Lists containing this project

README

        

# worldwind-react-globe-bs4

> React Bootstrap UI components for the [worldwind-react-globe](https://github.com/emxsys/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
>
> [Demo](https://emxsys.github.io/worldwind-react-globe-bs4/)

[![NPM](https://img.shields.io/npm/v/worldwind-react-globe-bs4.svg)](https://www.npmjs.com/package/worldwind-react-globe-bs4) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

## Install

```bash
npm install --save worldwind-react-globe
npm install --save worldwind-react-globe-bs4
```

## Example

```jsx
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'

export default class App extends Component {

constructor(props) {
super(props)
this.state = {
lat: 34.2,
lon: -119.2,
alt: 10e6,
globe: null
}
this.globeRef = React.createRef()
this.layersRef = React.createRef()
this.markersRef = React.createRef()
this.settingsRef = React.createRef()
}

componentDidMount() {
// Get the component with the WorldWindow after mounting
this.setState({globe: this.globeRef.current})
}

render() {
const globe = this.globeRef.current

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: 0.8}},
{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 = [
,
,

]

const navbarSearch =

return (



















)
}
}

```

## License

MIT © [Bruce Schubert](https://github.com/emxsys)