Skip to content

Sourcetype 'image' for mapbox_layers is not working #2056

@meteoDaniel

Description

@meteoDaniel

I want to overlay an image to mapbox, but it will not displayed.

My code:

import plotly.graph_objects as go

fig = go.Figure(go.Scattermapbox(
    lat=[],
    lon=[],
    mode='markers',
    marker=go.scattermapbox.Marker(
        size=5,
        symbol=['marker']
    ),
    text=['None'],
))

fig.update_layout(
    mapbox=go.layout.Mapbox(
        bearing=0,
        center=go.layout.mapbox.Center(
        lat=50,
        lon=10
    ),
        pitch=0,
    zoom=5),
margin = {"r": 0, "t": 0, "l": 0, "b": 0},
mapbox_style = "open-street-map",
mapbox_layers = [
    {
        "sourcetype": "image",
        "below": '',
        "source": [
            f"https://176.9.117.210/radar/data/2020/01/10/16/55/radar_de.png"

        ],
        "coordinates": [[1.0700,  55.7750629], [17.095451751, 55.7750629], [17.095451751,  45.510], [1.0700, 45.510]],

    },
    ])
fig.show()

Here is the console output from my browser:

Bildschirmfoto vom 2020-01-10 18-20-37

plotly version: '4.4.1'

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