Skip to content

Commit

Permalink
Fixes hello-world examples (visgl#461)
Browse files Browse the repository at this point in the history
* Fix examples

* Update README.md
  • Loading branch information
ibgreen authored Mar 23, 2017
1 parent 28f45de commit 655ca2f
Show file tree
Hide file tree
Showing 22 changed files with 333 additions and 61,033 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ const flights = new ArcLayer({
<DeckGL width={1920} height={1080} layers={[flights]} />
```

A very simple usage of deck.gl is showcased in the [exhibits directory](./exhibits),
using both webpack and browserify, so you can choose which setup you prefer or
are more familiar with.
A very simple usage of deck.gl is showcased in the [hello-world examples](./examples),
using both [webpack](./examples/hello-world-webpack) and
[browserify](./examples/hello-world-browserify),
so you can choose which setup you prefer or are more familiar with.

You can also take a look at the [docs website](https://uber.github.io/deck.gl)
or browse directly the [docs folder](./docs).
Expand Down
2 changes: 1 addition & 1 deletion demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"expr-eval": "^1.0.0",
"highlight.js": "^9.7.0",
"immutable": "^3.7.5",
"luma.gl": "3.0.0-beta.11",
"luma.gl": "^3.0.0",
"marked": "^0.3.6",
"react": "^15.4.0",
"react-dom": "^15.4.0",
Expand Down
19 changes: 12 additions & 7 deletions examples/hello-world-browserify/app.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import React, {Component} from 'react';
import {render} from 'react-dom';
// import MapGL from 'react-map-gl';
import DeckGL from 'deck.gl';
import {LineLayer} from 'deck.gl';
/* global document */
import MapGL from 'react-map-gl';
import DeckGL, {LineLayer} from 'deck.gl';

// Set your mapbox token here
const MAPBOX_TOKEN = process.env.MAPBOX_ACCESS_TOKEN; // eslint-disable-line
Expand Down Expand Up @@ -36,14 +34,21 @@ class Root extends Component {
})];

return (
<DeckGL
<MapGL
{...viewport}
width={width}
height={height}
layers={layers}
debug />
mapboxApiAccessToken={MAPBOX_TOKEN}>
<DeckGL
{...viewport}
width={width}
height={height}
layers={layers}
debug/>
</MapGL>
);
}
}

/* global document */
render(<Root />, document.body.appendChild(document.createElement('div')));
4 changes: 2 additions & 2 deletions examples/hello-world-browserify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
},
"dependencies": {
"babel-polyfill": "^6.16.0",
"deck.gl": "^4.0.0-beta.3",
"deck.gl": "^4.0.0-rc.3",
"immutable": "^3.8.1",
"luma.gl": "3.0.0-beta.11",
"luma.gl": "^3.0.0",
"react": "^15.4.1",
"react-dom": "^15.4.1",
"react-map-gl": "^2.0.0"
Expand Down
Loading

0 comments on commit 655ca2f

Please sign in to comment.