Skip to content

Add opacity effect to mapbox layers sourcetype "image" #4490

Closed
@meteoDaniel

Description

@meteoDaniel

Dear all would be great to have this feature.

I asked why it is not working in the plotly.py project: plotly/plotly.py#2077

import plotly.graph_objects as go

fig = go.Figure(go.Scattermapbox(), layout=dict(width=600, height=450))
mapbox = dict(zoom= 4.5,
              style='open-street-map',
              center=dict(
                        lat=42,
                        lon=-74.5),
              layers=[
                  dict(
                  below ='',
                      opacity=0.6,
                  source = "https://docs.mapbox.com/mapbox-gl-js/assets/radar.gif",
                  sourcetype= "image",
                  coordinates =  [
                          [-80.425, 46.437], [-71.516, 46.437], [-71.516, 37.936], [-80.425, 37.93]
                                 ])
                     ])
fig.update_layout(mapbox=mapbox)
fig.show()

Metadata

Metadata

Assignees

Labels

bugsomething broken

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions