Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2k
Description
Description
When creating ascattermap trace, users have the option to set thelayout.map.zoom andlayout.map.center options to control which section of the map is shown.
Ifzoom andcenter are not provided, the trace should default to showing all datapoints; however this is not what happens -- sometimes datapoints are outside the map area.
@ndrezn reported asimilar issue which seems to be caused by plotly.py, but this one is reproducible in plotly.js.
Codepen
This Codepen demonstrates the issue:
https://codepen.io/emilykl-code/pen/bNpyXqQ
Trondheim is one of the cities plotted, but it's not visible in the initial map view; you need to pan the map northward to see it.
Expected behavior
At a minimum, the initial map zoom and center should show all data points.
It's also probably reasonable to choose a default zoom such that the data points mostly fill the plot area.
Notes
Questions to answer:
- Where is the (bad) current default coming from: Is it something we are choosing in plotly.js, or is it something being set by MapLibre?
- Under what circumstances are points cut off? Does it only happen for points in the northern latitudes?