Skip to content

Commit

Permalink
Bump react-map-gl. Remove unused dependencies. Remove yarn in start c…
Browse files Browse the repository at this point in the history
…ommand. Update README (visgl#389)
  • Loading branch information
ibgreen authored and Shaojing Li committed Mar 8, 2017
1 parent e9ec48e commit db315df
Show file tree
Hide file tree
Showing 31 changed files with 144 additions and 109 deletions.
9 changes: 5 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

All notable changes to deck.gl will be documented in this file.

Official releases are documented first. Beta releases are listed
towards the end of this document.

<!--
Each version should:
List its release date in the above format.
Expand All @@ -20,6 +17,10 @@ Ref: http://keepachangelog.com/en/0.3.0/

## Recent Dev Releases

#### [TBD]
- Dependencies: Bump to react-map-gl@2, remove viewport-mercator-project & lodash.flatten
- ...

#### [v4.0.0-beta.3]
- Add PointCloudLayer
- FIX: `onHover` and `onClick` are no longer called on layers that are not affected
Expand Down Expand Up @@ -423,7 +424,7 @@ For details see [What's New](docs/whats-new.md)
- BREAKING: No longer use Camera/Scene to render. Enabler for issue #5.
- BREAKING: Sample layers now available through `import 'deck.gl/samples';
- FEATURE: FP64 layers now exported by default import 'deck.gl'
- BREAKING: DeckGLOverlay renamed to DeckGL: `import DeckGL from 'deck.gl/react';`
- BREAKING: DeckGLOverlay renamed to DeckGL: `import DeckGL from 'deck.gl';`
- FIX: GridLayer
- FEATURE: ChoroplethLayer now renders MultiPolygons and Polygons with holes

Expand Down
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use cases, such as scatterplots, choropleths etc in 2 and 3 dimensions.
## Example

```javascript
import DeckGL from 'deck.gl/react';
import DeckGL from 'deck.gl';
import {ArcLayer} from 'deck.gl';

const flights = new ArcLayer({
Expand All @@ -49,16 +49,24 @@ or browse directly the [docs folder](./docs).

npm install
npm test
npm start
npm start # See note below

Note that you will also need to do an npm install in the main example (`examples/layer-browser`)
since the npm start command tries to build and run that example.

cd examples/layer-browser
npm install
cd ../..

#### Node Version Requirement

Building deck.gl from source has a dependency on node `4.0` or higher.
Either upgrade to a newest version, or install something like [nvm](https://github.com/creationix/nvm).
Either upgrade to a newest version, or install something like
[nvm](https://github.com/creationix/nvm).

#### Install yarn
On macOS deck.gl uses [yarn] (https://www.npmjs.com/package/yarn) to manage packages.
To develop deck.gl, [install yarn] (https://yarnpkg.com/en/docs/install) with brew
On macOS deck.gl uses [yarn](https://www.npmjs.com/package/yarn) to manage packages.
To develop deck.gl, [install yarn](https://yarnpkg.com/en/docs/install) with brew
```
brew update
brew install yarn
Expand Down
2 changes: 1 addition & 1 deletion demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"marked": "^0.3.6",
"react": "^15.4.0",
"react-dom": "^15.4.0",
"react-map-gl": "^1.7.2",
"react-map-gl": "^2.0.0",
"react-redux": "^4.4.5",
"react-router": "^2.8.1",
"redux": "^3.6.0",
Expand Down
2 changes: 1 addition & 1 deletion demo/src/components/demos/arc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, {Component} from 'react';
import {scaleQuantile} from 'd3-scale';

import {ChoroplethLayer, ArcLayer} from 'deck.gl';
import DeckGL from 'deck.gl/react';
import DeckGL from 'deck.gl';

import {readableInteger} from '../../utils/format-utils';
import {MAPBOX_STYLES} from '../../constants/defaults';
Expand Down
2 changes: 1 addition & 1 deletion demo/src/components/demos/choropleth.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, {Component} from 'react';

import {ChoroplethLayer64} from 'deck.gl';
import DeckGL from 'deck.gl/react';
import DeckGL from 'deck.gl';

import {readableInteger} from '../../utils/format-utils';
import {MAPBOX_STYLES} from '../../constants/defaults';
Expand Down
2 changes: 1 addition & 1 deletion demo/src/components/demos/grid.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, {Component} from 'react';

import {ScreenGridLayer} from 'deck.gl';
import DeckGL from 'deck.gl/react';
import DeckGL from 'deck.gl';

import {readableInteger} from '../../utils/format-utils';
import {MAPBOX_STYLES} from '../../constants/defaults';
Expand Down
2 changes: 1 addition & 1 deletion demo/src/components/demos/scatterplot.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, {Component} from 'react';

import {ScatterplotLayer} from 'deck.gl';
import DeckGL from 'deck.gl/react';
import DeckGL from 'deck.gl';

import {MAPBOX_STYLES} from '../../constants/defaults';
import {readableInteger} from '../../utils/format-utils';
Expand Down
2 changes: 1 addition & 1 deletion demo/src/components/demos/trips.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, {Component} from 'react';

import {ExtrudedChoroplethLayer64} from 'deck.gl';
import DeckGL from 'deck.gl/react';
import DeckGL from 'deck.gl';

import {MAPBOX_STYLES} from '../../constants/defaults';
import {readableInteger} from '../../utils/format-utils';
Expand Down
3 changes: 0 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ deck.gl has been developed in parallel with a number of companion modules:
or other WebGL libraries.
* [react-map-gl](https://uber.github.io/react-map-gl/#/) - A React wrapper
around Mapbox GL which works seamlessly with deck.gl.
* [viewport-mercator-project](https://github.com/uber-common/viewport-mercator-project) -
Perspective enabled Web Mercator projection and transformation class. Created
for deck.gl, but broken out since it is independently useful and can for instance be used with `react-map-gl` to create perspective enabled SVG overlays (which could be used together with deck.gl).

In addition, in the future we hope to publish additional deck.gl layers and
layer packages as separate modules.
Expand Down
5 changes: 0 additions & 5 deletions docs/coordinate-systems.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@ Remarks:
and shared by all layers, so they will always pan zoom and tilt
together, regardless of what coordinate system their positions
are specified in.
* Most of deck.gl's coordinate system handling has been broken out into the
[viewport-mercator-project](https://github.com/uber-common/viewport-mercator-project)
module. See the README file there for more information and documentation
of the `Viewport` class.


### Non-cartographic Projection Mode

Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Remarks:

## Basic Usage

import DeckGL from 'deck.gl/react';
import DeckGL from 'deck.gl';
import {ArcLayer} from 'deck.gl';

const flights = new ArcLayer({
Expand Down
3 changes: 1 addition & 2 deletions docs/upgrade-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@

A small but breaking change is that the 'deck.gl/react' import is no
longer available, since the relative file caused complications with
the new support for support "tree shaking" (multiple transpiled distributions). This means you will need to revert to the pre-3.0 way of importing the react
component:
the new support for support "tree shaking" (multiple transpiled distributions). This means you will need to revert to the pre-3.0 way of importing the react component:

```
// V3
Expand Down
8 changes: 1 addition & 7 deletions docs/using-with-react.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ render it as a child of another component, passing in your list of deck.gl
layers as a property.

import MapGL from 'react-map-gl';
import DeckGL from 'deck.gl/react';
import DeckGL from 'deck.gl';
import {ScatterplotLayer} from 'deck.gl';
import {Viewport} from 'viewport-mercator-project';

const viewport = new Viewport({...});

Expand Down Expand Up @@ -81,11 +80,6 @@ If `viewport` is not supplied, deck.gl will look for web mercator projection
parameters (latitude, longitude, zoom, bearing and pitch) and create a
`WebMercatorViewport` (which is a subclass of `Viewport`).

Note that both `Viewport` and `WebMercatorViewport` are imported from
[viewport-mercator-project](https://github.com/uber-common/viewport-mercator-project).
Consult the documentation of that module for more information on how to
create these objects.

##### `width` (Number, required)

Width of the canvas.
Expand Down
1 change: 1 addition & 0 deletions examples/hello-world-browserify/app.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
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';
// import MapGL from 'react-map-gl';
Expand Down
6 changes: 3 additions & 3 deletions examples/hello-world-browserify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
},
"dependencies": {
"babel-polyfill": "^6.16.0",
"deck.gl": "^4.0.0-beta.1",
"deck.gl": "^4.0.0-beta.3",
"immutable": "^3.8.1",
"luma.gl": "3.0.0-beta.7",
"luma.gl": "3.0.0-beta.9",
"react": "^15.4.1",
"react-dom": "^15.4.1",
"react-map-gl": "^1.7.2"
"react-map-gl": "^2.0.0"
},
"devDependencies": {
"babel-preset-es2015": "^6.18.0",
Expand Down
4 changes: 2 additions & 2 deletions examples/hello-world-rollup/app.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, {Component} from 'react';
import {render} from 'react-dom';
import MapGL from 'react-map-gl';
import DeckGL from 'deck.gl/react';
// import MapGL from 'react-map-gl';
import DeckGL from 'deck.gl';
import {LineLayer} from 'deck.gl';
/* global document */

Expand Down
6 changes: 3 additions & 3 deletions examples/hello-world-rollup/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
"dependencies": {
"babel-polyfill": "^6.16.0",
"canvas": "^1.6.2",
"deck.gl": "3.1.0-beta.16",
"deck.gl": "^4.0.0-beta.3",
"immutable": "^3.8.1",
"luma.gl": "3.0.0-alpha.4",
"luma.gl": "3.0.0-beta.9",
"react": "^15.4.1",
"react-dom": "^15.4.1",
"react-map-gl": "^1.7.2"
"react-map-gl": "^2.0.0"
},
"devDependencies": {
"envify": "^4.0.0",
Expand Down
6 changes: 3 additions & 3 deletions examples/hello-world-webpack2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
"build": "NODE_ENV=production webpack --env.prod=true"
},
"dependencies": {
"deck.gl": "^4.0.0-beta.1",
"deck.gl": "^4.0.0-beta.3",
"immutable": "^3.8.1",
"luma.gl": "3.0.0-beta.7",
"luma.gl": "3.0.0-beta.9",
"react": "^15.4.1",
"react-dom": "^15.4.1",
"react-map-gl": "^1.7.2"
"react-map-gl": "^2.0.0"
},
"devDependencies": {
"buble-loader": "^0.4.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/layer-browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"react": "^15.4.1",
"react-autobind": "^1.0.6",
"react-dom": "^15.4.1",
"react-map-gl": "1.7.2",
"react-map-gl": "^2.0.0",
"react-stats": "^0.0.5",
"s2-geometry": "^1.2.9"
},
Expand Down
Loading

0 comments on commit db315df

Please sign in to comment.