Skip to content

self.deckgl can be None + map not visible due to missing CSS for panel deckGL example #3

@madhur-tandon

Description

@madhur-tandon

For the Panel DeckGL example,

@param.depends('view', 'radius', 'elevation', 'arc_view', watch=True)
    def update_spec(self):
        self.deck_gl.object = dict(self.spec)

The above snippet used to error out with: AttributeError: 'NoneType' object has no attribute 'object'
due to which I changed it to:

@param.depends('view', 'radius', 'elevation', 'arc_view', watch=True)
    def update_spec(self):
        if self.deck_gl:
            self.deck_gl.object = dict(self.spec)

After doing the above, we get issues related to missing CSS...

Screenshot 2023-11-26 at 11 19 50 PM

According to the quick-start here: https://docs.mapbox.com/mapbox-gl-js/guides/install/#quickstart

using the following snippet should be enough, which we already do so...

<script src='https://api.mapbox.com/mapbox-gl-js/v2.14.1/mapbox-gl.js'></script>
<link href='https://api.mapbox.com/mapbox-gl-js/v2.14.1/mapbox-gl.css' rel='stylesheet' />

So the issue is perhaps related to self.deck_gl being None only I assume?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions