Skip to content

Commit

Permalink
website: Add CARTO section to upgrade guide (#8657)
Browse files Browse the repository at this point in the history
  • Loading branch information
felixpalmer committed Mar 15, 2024
1 parent 61dd3a8 commit 12624ac
Showing 1 changed file with 27 additions and 2 deletions.
29 changes: 27 additions & 2 deletions docs/upgrade-guide.md
Expand Up @@ -20,9 +20,9 @@ new Model(this.context.gl, {opts});

- `Deck.pickObjects` minor breaking change: if the same `data` is used by multiple top-level layers (e.g. a `ScatterplotLayer` and a `TextLayer`) that are visible in the picking bounds, `pickObjects` will yield one result for each picked object+layer combination, instead of one result for each picked object in previous versions.

### @deck.gl.mapbox
### @deck.gl/mapbox

`MapboxLayer` has been remove. Use `MapboxOverlay` instead.
`MapboxLayer` has been removed. Use `MapboxOverlay` instead.

```typescript
// deck.gl v9
Expand All @@ -36,6 +36,31 @@ import {MapboxLayer} from '@deck.gl/mapbox'
map.addLayer(new MapboxLayer({type: ArcLayer, ...}))
```

### @deck.gl/carto

`CartoLayer` has been removed. Use a [Data Source](./api-reference/carto/data-sources) in combination with an [appropriate Layer](./api-reference/carto/overview#custom-layers-connected-to-carto-datasource) instead.

```typescript
// deck.gl v9
import {VectorTileLayer, vectorQuerySource} from '@deck.gl/carto';
const data = vectorQuerySource({
accessToken: 'XXX',
connectionName: 'carto_dw',
sqlQuery: 'SELECT * FROM cartobq.testtables.points_10k',
});
const layer = new VectorTileLayer({data, ...styleProps});

// deck.gl v8
import {CartoLayer, setDefaultCredentials, MAP_TYPES} from '@deck.gl/carto';
setDefaultCredentials({accessToken: 'XXX'});
const layer = new CartoLayer({
type: MAP_TYPES.QUERY,
connection: 'carto_dw',
data: 'SELECT * FROM cartobq.testtables.points_10k',
...styleProps
});
```

## Upgrading from deck.gl v8.8 to v8.9

#### Breaking changes
Expand Down

0 comments on commit 12624ac

Please sign in to comment.