Title: [BUG]: `layout.uirevision` doesn't play well with map subplot auto-fit · Issue #7907 · plotly/plotly.js · GitHub
Open Graph Title: [BUG]: `layout.uirevision` doesn't play well with map subplot auto-fit · Issue #7907 · plotly/plotly.js
X Title: [BUG]: `layout.uirevision` doesn't play well with map subplot auto-fit · Issue #7907 · plotly/plotly.js
Description: Description When a map subplot uses fitbounds, layout.uirevision fails to preserve the user's subsequent pan/zoom across Plotly.react calls. The map snaps back to the auto-fit view even when the uirevision value is unchanged. Screenshots...
Open Graph Description: Description When a map subplot uses fitbounds, layout.uirevision fails to preserve the user's subsequent pan/zoom across Plotly.react calls. The map snaps back to the auto-fit view even when the ui...
X Description: Description When a map subplot uses fitbounds, layout.uirevision fails to preserve the user's subsequent pan/zoom across Plotly.react calls. The map snaps back to the auto-fit view even when th...
Opengraph URL: https://github.com/plotly/plotly.js/issues/7907
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[BUG]: `layout.uirevision` doesn't play well with map subplot auto-fit","articleBody":"### Description\n\nWhen a `map` subplot uses `fitbounds`, `layout.uirevision` fails to preserve the user's subsequent pan/zoom across `Plotly.react` calls. The map snaps back to the auto-fit view even when the `uirevision` value is unchanged.\n\n### Screenshots/Video\n\nhttps://github.com/user-attachments/assets/48f4da34-d74f-4958-a874-2bd9a3844181\n\n### Steps to reproduce\n\n- Be on v4.0 (or the default branch after it gets released)\n- Plot a `scattermap` with `uirevision` set and no explicit `center`/`zoom`:\n ```js\n Plotly.newPlot(gd, [{\n type: 'scattermap',\n lon: [-75, -74, -73],\n lat: [40, 41, 42],\n mode: 'markers'\n }], {\n uirevision: 'v1',\n width: 400,\n height: 400\n });\n ```\n- Pan the map with the mouse\n- Call `Plotly.react` with the same `uirevision`:\n ```js\n Plotly.react(gd, gd.data, { uirevision: 'v1', width: 400, height: 400 });\n ```\n- Note that the map snaps back to the auto-fit view instead of keeping the panned view\n\n### Notes\n\n- Discovered while working on #7884. The auto-fit and zoom-button behaviors landed there; this uirevision integration was deferred as out-of-scope.\n- This works correctly for cartesian axes (via `autorange`) and for map subplots when the user *has* supplied an explicit `center`/`zoom` from the start. It only fails on the auto-fit path. \n","author":{"url":"https://github.com/camdecoster","@type":"Person","name":"camdecoster"},"datePublished":"2026-07-15T23:08:17Z","url":"https://github.com/plotly/plotly.js/issues/7907"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d8760525-6d8a-874a-7d8f-1d730c124190 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9D2C:F7C4C:2BA88F3:3A81A6F:6B01D25B |
| html-safe-nonce | a6b43f1dce2df222d05b5e991ff3b192e3d99aad81aea790cde513057e05e87e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RDJDOkY3QzRDOjJCQTg4RjM6M0E4MUE2Rjo2QjAxRDI1QiIsInZpc2l0b3JfaWQiOiIyNzkyMDg4NDczNDc2MTI1Mjc1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 5a9789f36dd9ba23137c8666c07227951b83caad362808cabdc3c70c4802cae5 |
| hovercard-subject-tag | issue:4897035198 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/plotly/plotly.js/7907/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7df399321c4e05e23a57a621f9d704bdfe360d457fa701659154d097727ca382/plotly/plotly.js/issues/7907 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7df399321c4e05e23a57a621f9d704bdfe360d457fa701659154d097727ca382/plotly/plotly.js/issues/7907 |
| og:image:alt | Description When a map subplot uses fitbounds, layout.uirevision fails to preserve the user's subsequent pan/zoom across Plotly.react calls. The map snaps back to the auto-fit view even when the ui... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | camdecoster |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/plotly/plotly.js git https://github.com/plotly/plotly.js.git |
| octolytics-dimension-user_id | 5997976 |
| octolytics-dimension-user_login | plotly |
| octolytics-dimension-repository_id | 45646037 |
| octolytics-dimension-repository_nwo | plotly/plotly.js |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 45646037 |
| octolytics-dimension-repository_network_root_nwo | plotly/plotly.js |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width