Black Lives Matter. Please consider donating to Black Girls Code today.

📣 Initial release of Dash Deck, a library for rendering webgl & 3D maps with pydeck and deck.gl in Dash

Awesome extension, so much potential.

Has anyone had success changing the basemap?

Assume the following data passed to deck

{
    "initialViewState": {
        "longitude": -122.45,
        "latitude": 37.8,
        "zoom": 6.6
    },
    "views": [
        {
            "@@type": "MapView",
            "mapStyle": "https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json"
        }
    ],
    "layers": [
        {
            "@@type": "TextLayer",
            "getColor": [0,255,255],
            "data": [
                {
                    "position": [ -122.45, 37.8 ],
                    "text": "Hello World"
                }
            ]
        }
    ]
}

This example works fine on the deck playground ( https://deck.gl/playground/ ), however the same basemap swap doesn’t work in dash_deck. Any hints on how to change the basemap to a non-mapbox source?

I added extensive testing for mapbox styles but not other styles. Since the library is based on pydeck, I’d recommend checking out how they do it, and use the resultingpdkobject as input to the dash deck. You can check out the explorer for more examples involving pydeck.

Hello,

Thanks so much for this project, it’s really awesome!
I wonder if there’s a way to dynamically get the current ViewState as the user pans throughout the map. I’d like to load a fairly large amount of data and it would be nice to render it dynamically.

Thanks!