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?
@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