I'm trying to plot a map usiong plotly express like this.
fig = px.scatter_mapbox(
df,
lat="latitude",
lon="longitude",
hover_name="abrv",
hover_data=["name"],
color_discrete_sequence=["blue"],
zoom=8,
center = {
"lat":df["latitude"].values[0],
"lon":df["longitude"].values[0],
},
size = "size"
)
fig.update_layout(
mapbox_style="white-bg",
mapbox_layers=[
{
"below": 'traces',
"sourcetype": "raster",
"sourceattribution": "United States Geological Survey",
"source": [
"https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryOnly/MapServer/tile/{z}/{y}/{x}"
]
}
])
fig.update_layout(margin={"r":0,"t":0,"l":0,"b":0})
It goes perfectly on my local machine, but when I put it in an external server it just plots a white map. I've added the url https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryOnly/MapServer to be accepted on the server's firewall, but it stills the same.
Does anyone know the exact request parameters of what I'm doing? (IP, PORT, PROTOCOL, ...)