From 92b7ec3db067d733a938c95be6f6b2f746a952f1 Mon Sep 17 00:00:00 2001 From: Don McCurdy Date: Tue, 30 Apr 2024 11:05:20 -0400 Subject: [PATCH 1/2] docs(carto): Clean up CARTO fetchMap example --- docs/api-reference/carto/fetch-map.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/docs/api-reference/carto/fetch-map.md b/docs/api-reference/carto/fetch-map.md index 559489cc6be..aa0b10e6fd3 100644 --- a/docs/api-reference/carto/fetch-map.md +++ b/docs/api-reference/carto/fetch-map.md @@ -24,15 +24,13 @@ 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 MAP_STYLE = ; 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 }); From d1243bfbcd43a9f93fad2099f43a1c0fafb1b892 Mon Sep 17 00:00:00 2001 From: Don McCurdy Date: Tue, 30 Apr 2024 13:56:37 -0400 Subject: [PATCH 2/2] fix typo --- docs/api-reference/carto/fetch-map.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/api-reference/carto/fetch-map.md b/docs/api-reference/carto/fetch-map.md index aa0b10e6fd3..34845b6f7ef 100644 --- a/docs/api-reference/carto/fetch-map.md +++ b/docs/api-reference/carto/fetch-map.md @@ -25,7 +25,6 @@ fetchMap({cartoMapId}).then(map => new Deck(map)); ```js fetchMap({cartoMapId}).then(({initialViewState, mapStyle, layers}) => { - const MAP_STYLE = ; const deckgl = new deck.DeckGL({ container: 'container', controller: true,