Skip to content

Commit

Permalink
docs(carto): Clean up CARTO fetchMap example (#8857)
Browse files Browse the repository at this point in the history
  • Loading branch information
donmccurdy committed Apr 30, 2024
1 parent 65f9a25 commit a9acdf8
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions docs/api-reference/carto/fetch-map.md
Expand Up @@ -24,15 +24,12 @@ fetchMap({cartoMapId}).then(map => new Deck(map));
### Integration with CARTO basemaps

```js
import mapboxgl from 'mapbox-gl';

fetchMap({cartoMapId}).then(({initialViewState, mapStyle, layers}) => {
// Add Mapbox GL for the basemap. It's not a requirement if you don't need a basemap.
const MAP_STYLE = `https://basemaps.cartocdn.com/gl/${mapStyle.styleType}-gl-style/style.json`;
const deckgl = new deck.DeckGL({
container: 'container',
controller: true,
mapStyle: MAP_STYLE,
// (Optional) Include a basemap.
mapStyle: `https://basemaps.cartocdn.com/gl/${mapStyle.styleType}-gl-style/style.json`,
initialViewState,
layers
});
Expand Down

0 comments on commit a9acdf8

Please sign in to comment.