plotly / dash-deck

Bringing deck.gl and pydeck into Dash
https://dash-gallery.plotly.host/dash-deck-explorer/
MIT License
92 stars 19 forks source link

How to change to maplibre #27

Open jixian01 opened 3 months ago

jixian01 commented 3 months ago

Description

Hey all, how could the basemap in deck.gl changed to maplibre? Thank you!

Steps/Code to Reproduce

Expected Results

Actual Results

Versions

JamesStratford commented 1 month ago

Looking at the source

dash-deck/src/lib/components/DeckGL.react.js

    // Only render static map if a mapbox token was given, else fallback to the maplibre backend
    let staticMap;
    if (mapboxKey !== null){
      staticMap = <Map
        mapboxAccessToken={mapboxKey}
        mapStyle={deckProps.mapStyle}
      />
    } else {
      staticMap = <MapLibre
          mapStyle={deckProps.mapStyle}
      />
    }

MapLibre should be used when mapboxKey is None, but it doesn't seem to be working for me either