Skip to content

Commit

Permalink
Update starting with map text
Browse files Browse the repository at this point in the history
  • Loading branch information
abmai committed Aug 16, 2017
1 parent 6611fcd commit 0acdf6e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions demos/starting-code/app.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* global window */
import React, {Component} from 'react';

const MAPBOX_STYLE = 'mapbox://styles/uberdata/cive485h000192imn6c6cc8fc';
Expand Down
8 changes: 5 additions & 3 deletions docs/demos/starting-with-map.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ highly recommended that you do so, or your application might not work.

The app component in the starting code above currently looks like this:
```js
/* global window */
import React, {Component} from 'react';

export default class App extends Component {
Expand All @@ -27,7 +28,7 @@ export default class App extends Component {

render() {
return (
<div />
<div>Empty App, Edit Me!</div>
);
}

Expand All @@ -47,8 +48,8 @@ export default class App extends Component {
super(props);
this.state = {
viewport: {
width: 500,
height: 500,
width: window.innerWidth,
height: window.innerHeight,
longitude: -74,
latitude: 40.7,
zoom: 11,
Expand Down Expand Up @@ -78,6 +79,7 @@ export default class App extends Component {
<div>
<MapGL
{...viewport}
mapStyle={MAPBOX_STYLE}
// Callback for viewport changes, addressed below
onViewportChange={this._onViewportChange.bind(this)}
// This is needed to use mapbox styles
Expand Down
2 changes: 2 additions & 0 deletions docs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ There should now be a new link called **Live Code Playground** right after
a nice visualization app as the tutorial progresses. Every change you make will
be rendered on this page (assuming you keep the local node instance running).

You can press the tilde (~) key anytime to fullscreen the app that will be displayed here.

## 3. Open Starting Code in your Text Editor

You can now point your text editor to the following file:
Expand Down

0 comments on commit 0acdf6e

Please sign in to comment.