diff --git a/docs/api-reference/carto/fetch-map.md b/docs/api-reference/carto/fetch-map.md index 559489cc6be..34845b6f7ef 100644 --- a/docs/api-reference/carto/fetch-map.md +++ b/docs/api-reference/carto/fetch-map.md @@ -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 });