GitHub user dosubot[bot] added a comment to the discussion: Deck.gl map change 
style directly on dashboard

<!-- Answer -->
You can't render `updatedLayers` because they are not actually being passed to 
the DeckGL component's `layers` prop. In your code, the DeckGL component is 
using the `currentLayer` state as its `layers` prop:

```jsx
<DeckGL
  ...
  layers={currentLayer}
  ...
>
```

The `updatedLayers` array is defined and logged, but never used in rendering. 
If you want to render `updatedLayers`, you need to pass them to the `layers` 
prop, for example:

```jsx
<DeckGL
  ...
  layers={updatedLayers}
  ...
>
```

Or, if you want to combine them with your dynamic layers, you can do something 
like:

```jsx
<DeckGL
  ...
  layers={[...updatedLayers, ...currentLayer]}
  ...
>
```

If you want to dynamically control which set of layers is rendered (for 
example, sometimes `currentLayer`, sometimes `updatedLayers`), you can use a 
state variable or a prop to switch between them.

Also, make sure that the `visible` property of each layer is set to `true` if 
you want it to be displayed. In your example, `IntensityLayer` has `visible: 
false`, so it will not be shown.

In summary: define which layers you want to render, and pass that array to the 
`layers` prop of the DeckGL component. The `updatedLayers` array alone will not 
be rendered unless you do this.


<!-- Dosu Comment Footer -->
*To reply, just mention my name [@dosu](https://go.dosu.dev/dosubot).*

---
<sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/dfd72d61-215e-4d12-b278-4ee62a8ca1d1?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/dfd72d61-215e-4d12-b278-4ee62a8ca1d1?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/dfd72d61-215e-4d12-b278-4ee62a8ca1d1?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/dfd72d61-215e-4d12-b278-4ee62a8ca1d1?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/dfd72d61-215e-4d12-b278-4ee62a8ca1d1?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/dfd72d61-215e-4d12-b278-4ee62a8ca1d1?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/dfd72d61-215e-4d12-b278-4ee62a8ca1d1?feedback_type=other)</sup>&nbsp;&nbsp;[![Join
 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Sh
 are on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/32149)

GitHub link: 
https://github.com/apache/superset/discussions/32149#discussioncomment-13297132

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: 
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to