| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Thanks for the PR! We recently made some changes to the map traces to auto-fit for non-choropleth plots. This is in the release branch for the upcoming v4.0. Would you be willing to target that branch with your PR and rework your PR? |
Sorry, something went wrong.
Extend layout.map.fitbounds to cover choroplethmap traces, which the v4.0 auto-fit currently skips. With 'locations' (the default) the view fits to the bounding box of the geometries matched by the trace's locations; a new 'geojson' value fits to the entire input geojson instead. Point traces (scattermap, densitymap) are unaffected. Bounds are read at supply-defaults time from the resolved trace geojson, so a URL geojson that has not been fetched yet is skipped quietly rather than driving the fit or logging an error.
The test asserted that any choroplethmap trace on the subplot forces getMapFitBounds to return null. That was true before choroplethmap support was added, but the added commit intentionally lets a choroplethmap trace with unresolved geojson be skipped while other traces still drive the fit, so the old assertion no longer matches the documented behavior. Updated the test to check that case, and added the real null case: a subplot where the only trace is a choroplethmap with no resolvable geojson.
|
Hello! This got closed unintentionally when the base branch got deleted. Could you open a new PR targeting the default branch? |
Sorry, something went wrong.
Never mind. It's open again. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Fixes #3434.
Reworked for the v4.0 branch as requested. Since v4.0 already auto-fits lon/lat map traces (scattermap, densitymap) via layout.map.fitbounds, this PR now adds the part that is still missing: choroplethmap support.
What this adds on top of v4.0's fitbounds:
Tests: two updated unit specs in map_get_fit_bounds_test.js covering the choroplethmap paths (skip-when-unresolved with other traces still driving the fit, and null when nothing contributes), plus three @gl integration specs in map_test.js. The map auto-fit suite passes 9/9 with these commits; a control run on plain v4.0 confirms the three new specs are the only additions and nothing else flips.