Permalink
Browse files

Add initial Cesium viewer to the app

  • Loading branch information...
markerikson committed Feb 24, 2017
1 parent 2015273 commit 17479d39c8b01aa6d3959e59cfccdb3571b88769
Showing with 15 additions and 5 deletions.
  1. +1 −1 public/index.html
  2. +9 −4 src/App.js
  3. +5 −0 src/index.js
View
@@ -13,7 +13,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
<title>Cesium + React + Webpack Demo</title>
</head>
<body>
<div id="root"></div>
View
@@ -1,14 +1,19 @@
import React, {Component} from 'react';
import React, { Component } from 'react';
import Viewer from "cesium/Source/Widgets/Viewer/Viewer";
class App extends Component {
componentDidMount() {
this.viewer = new Viewer(this.cesiumContainer);
}
render() {
return (
<div>
Empty
<div id="cesiumContainer" ref={ element => this.cesiumContainer = element }/>
</div>
);
}
}
export default App;
export default App;
View
@@ -3,6 +3,11 @@ import ReactDOM from 'react-dom';
import App from './App';
import './index.css';
import "cesium/Source/Widgets/widgets.css";
import buildModuleUrl from "cesium/Source/Core/buildModuleUrl";
buildModuleUrl.setBaseUrl('./cesium/');
ReactDOM.render(
<App />,
document.getElementById('root')

0 comments on commit 17479d3

Please sign in to comment.