Mapbox base map is not visible

I have created a map chart using go.scattermapbox in Plotly. While the figure is generated successfully, the base map fails to display. I can see the legends, hover over the map, and the tooltips for the bubbles are displayed correctly for some places. However, the base map is not visible. I have tried using the free styles provided by Mapbox, but they are not working either. Additionally, I have incorporated Mapbox-related links into my Content Security Policy (CSP), yet the issue persists. Could anyone provide assistance with this problem?


image
Screenshot 2024-05-31 111811

@server.after_request
def add_security_headers(response):
    response.headers["Content-Security-Policy"] = (
        f"connect-src 'self'  https://api.mapbox.com https://api.tiles.mapbox.com https://events.mapbox.com;"
    )
    return response

Hey @Vaishali does the plot render properly locally?

@AIMPED I had added some security policy so i had to add mapbox related urls . Now its working fine

1 Like