8000 Home · USACE/groundwork-geo Wiki · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Will Breitkreutz edited this page Feb 6, 2024 · 9 revisions

Groundwork-Geo is a collection of React components that will all 10000 ow you to embed a Cesium JS based map into your application. These docs cover using the library, an example application is hosted on the gh-pages site for this repo, see the source here: https://github.com/USACE/groundwork-geo/tree/main/src

Getting Started

Install the library from NPM:

npm install @usace/groundwork-geo

Add a globe to your site

import { MapLayout, Globe } from "@usace/groundwork-geo"

function App() {
  const handleGlobeMount = (viewer) => {
    console.log("viewer mounted", viewer);
  };

  return (
    <div style={{ width: "100vh", height: "100vh", position: "relative" }}>
      <MapLayout>
        <Globe
          
          initialPosition={{
            lon: -94.566709,
            lat: 39.08714,
            height: 10000,
            heading: 0,
            pitch: -90,
            roll: 0,
          }}
        />
      </MapLayout>
    </div>
  );
}

export default App;

Read up on the MapLayout and Globe components to get an idea of the different props they expose.

Clone this wiki locally
0