Skip to content

Commit

Permalink
what's new and upgrade guide
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiaoji Chen committed Mar 15, 2020
1 parent 000eab9 commit 7c58b37
Show file tree
Hide file tree
Showing 2 changed files with 109 additions and 8 deletions.
14 changes: 6 additions & 8 deletions docs/upgrade-guide.md
Expand Up @@ -4,17 +4,15 @@

### Breaking Changes

- `s2-geometry` is no longer a dependency of `@deck.gl/geo-layers`.
- `s2-geometry` is no longer a dependency of `@deck.gl/geo-layers`. If you were using this module in an application, it needs to be explicitly added to package.json.
- deck.gl no longer crashes if one of the layers encounters an error during update and/or render. By default, errors are now logged to the console. Specify the `onError` callback to manually handle errors in your application.
- `Deck` now reacts to changes in the `initialViewState` prop. In 8.0 and earlier versions, this prop was not monitored after the deck instance was constructed. Starting 8.1, if `initialViewState` changes deeply, the camera will be reset. It is recommended that you use a constant for `initialViewState` to achieve behavior consistent with the previous versions.

##### Tile3DLayer

- A new prop `loader` needs to be provided, one of `CesiumIonLoader`, `Tiles3DLoader` from (`@loaders.gl/3d-tiles`) or `I3SLoader` from (`@loaders.gl/i3s`).
- Since `Tile3DLayer` uses `load` from [`@loaders.gl/core`](https://loaders.gl/modules/core/docs/api-reference/load) to load a tileset and then construct a `Tileset3D` object.
`loadOptions[loader.id]` is used for passing any options available to the `loader`, and if you need forward options to [`Tileset3D`](https://loaders.gl/modules/tiles/docs/api-reference/tileset-3d#constructor-1), use`loadOptions.tileset`
- `loaderOptions` default to `{}`. used to be `loadOptions: {throttleRequest: true}`
- `_ionAccessId` and `_ionAccesToken` are removed. To render an ion dataset with `Tile3DLayer`, pass the ion dataset url to prop `data`, and `loadOptions.headers` with Cesium authentication token.

**Code examples**
- The `loadOptions` prop is now used for passing all loaders.gl options, not just [`Tileset3D`](https://loaders.gl/modules/tiles/docs/api-reference/tileset-3d#constructor-1). To revert back to the 8.0 behavior, use `{tileset: {throttleRequest: true}}`.
- `_ionAccessId` and `_ionAccesToken` props are removed. To render an ion dataset with `Tile3DLayer`, follow this example:

```js
import {CesiumIonLoader} from '@loaders.gl/3d-tiles';
Expand All @@ -24,7 +22,7 @@ import {Tile3DLayer} from '@deck.gl/geo-layers';
const layer = new Tile3DLayer({
id: 'tile-3d-layer',
// tileset json file url
data: 'https://assets.cesium.com/43978/tileset.json',
data: 'https://assets.cesium.com/<ion_access_id>/tileset.json',
loader: CesiumIonLoader,
// https://cesium.com/docs/rest-api/
loadOptions: {
Expand Down
103 changes: 103 additions & 0 deletions docs/whats-new.md
Expand Up @@ -2,6 +2,109 @@

This page contains highlights of each deck.gl release. Also check our [vis.gl blog](https://medium.com/vis-gl) for news about new releases and features in deck.gl.

## deck.gl v8.1

### Growing Tile Solutions

<table style="border: 0;" align="center">
<tbody>
<tr>
<td>
<img style="max-height:200px" src="https://raw.github.com/uber-common/deck.gl-data/master/images/whats-new/tile-2d.gif" />
<p><i>Non-geospatial TileLayer</i></p>
</td>
<td>
<img style="max-height:200px" src="https://raw.github.com/uber-common/deck.gl-data/master/images/whats-new/mvt-layer.jpg" />
<p><i>MVTLayer</i></p>
</td>
<td>
<img style="max-height:200px" src="https://raw.github.com/uber-common/deck.gl-data/master/images/whats-new/terrain.jpg" />
<p><i>TerrainLayer</i></p>
</td>
</tr>
</tbody>
</table>


The `@deck.gl/geo-layers` module added many new features to address popular tiled data use cases.

#### TileLayer

Multiple bugs have been fixed in the [TileLayer](/docs/layers/tile-layer.md) regarding data fetching and tree traversal.

The layer now supports non-geospatial views. Check out this [example](https://github.com/uber/deck.gl/tree/master/examples/website/image-tile) by [@ilan-gold](https://github.com/ilan-gold) that renders a 576 Megapixel image of the moon.

New props are added to better control the layer's behavior:

- `maxCacheByteSize`: for precise management of memory usage
- `refinementStrategy`: to reduce flashing/overlapping during loading
- `tileSize` (non-geospatial only)

#### MVTTileLayer

Based on the `TileLayer`, [MVTTileLayer](/docs/layers/mvt-layer.md) loads and renders tiles in the [Mapbox Vector Tiles specification](https://github.com/mapbox/vector-tile-spec). This new layer make it easier to leverage the many great [open source tools](https://github.com/mapbox/awesome-vector-tiles) in use with deck.gl.

This effort is led by contributors from [CARTO](https://carto.com/).

#### TerrainLayer

[TerrainLayer](/docs/layers/terrain-layer.md) loads color-encoded heightmap and reconstructs 3D mesh surfaces. Check out our [example](https://github.com/uber/deck.gl/tree/master/examples/website/terrain).

### ESRI + deck.gl


<table style="border: 0;" align="center">
<tbody>
<tr>
<td>
<img style="max-height:200px" src="https://raw.github.com/uber-common/deck.gl-data/master/images/whats-new/arcgis.jpg" />
<p><i>deck.gl + ArcGIS basemap</i></p>
</td>
<td>
<img style="max-height:200px" src="https://raw.github.com/uber-common/deck.gl-data/master/images/whats-new/esri-i3s.gif" />
<p><i>Tile3DLayer + I3S</i></p>
</td>
</tr>
</tbody>
</table>

In collaboration with GIS industry leader [ESRI](https://www.esri.com), we are releasing new experimental features that work with ArcGIS basemap and I3S tiles.

#### @deck.gl/arcgis

You can now use ArcGIS basemaps with deck.gl. This new module lets apps render deck.gl layers into the WebGL context of [ArcGIS API for JavaScript](https://developers.arcgis.com/javascript/). 3D scene view support is experimental in this initial release. To get started, check out [the example](https://deck.gl/gallery/boiler-plate-arcgis) and [the documentation](/docs/api-reference/arcgis/overview.md).

#### Tile3DLayer and I3S format

`Tile3DLayer` is adding preliminary support for the [OGC Indexed 3d Scene (I3S)](https://docs.opengeospatial.org/cs/17-014r5/17-014r5.html) format. See [documentation](/docs/layers/tile-3d-layer.md) for details.

### World Repeating in Web Mercator Maps

![Repeating worlds at low zoom levels](https://user-images.githubusercontent.com/2059298/71849768-b397a700-3087-11ea-8c48-93d8bb9188db.gif)

The `MapView` now supports repeating worlds at low zoom levels. For backward compatibility, this feature is opt-in. Apps may turn it on by setting `views: new MapView({repeat: true})` on `Deck` or `DeckGL`.

Repeating is always on when using [MapboxLayer](/docs/api-reference/mapbox/mapbox-layer.md) and [GoogleMapsOverlay](/docs/api-reference/google-maps/google-maps-overlay.md).

As a result, `GoogleMapsOverlay` now supports all Google Maps zoom levels.

### pydeck 0.3.0

pydeck now uses the [binary attribute API](/docs/developer-guide/performance.md#supply-attributes-directly) to communicate between Python and JavaScript. This greatly increases the speed and the amount of data that it can render.

pydeck now supports external layer modules via a new `custom_libraries` setting.

### Other Improvements

- When using `Deck` as a stateful component, you can now update its `initialViewState` prop to reset the camera.
- A new prop `onError` is added to `Deck` to handle errors, instead of crashing the app.
- `Layer` instances now expose a new member `isLoaded`.
- `PathLayer`'s joint calculation is improved when using with short line segments and extreme angles.
- `BrushingExtension` supports a new `brushingTarget` mode `source_target`.
- `PathStyleExtension` now has a new mode `offset`. This feature can be used for positioning polygon strokes inside/outside, or rendering overlapped paths in opposite directions.
- `TextLayer` now supports [binary attributes](/docs/layers/text-layer.md#use-binary-attributes).


## deck.gl v8.0

### Performance
Expand Down

0 comments on commit 7c58b37

Please sign in to comment.