Title: ENH: provide mapbox viewport coordinates in relayout data · Issue #4399 · plotly/plotly.js · GitHub
Open Graph Title: ENH: provide mapbox viewport coordinates in relayout data · Issue #4399 · plotly/plotly.js
X Title: ENH: provide mapbox viewport coordinates in relayout data · Issue #4399 · plotly/plotly.js
Description: I would like the mapbox subplot relayout data to include the lon/lat of the viewport corners. This would make it possible to use a mapbox subplot to display an image layer that is dynamically generated for the current viewport. The relay...
Open Graph Description: I would like the mapbox subplot relayout data to include the lon/lat of the viewport corners. This would make it possible to use a mapbox subplot to display an image layer that is dynamically gener...
X Description: I would like the mapbox subplot relayout data to include the lon/lat of the viewport corners. This would make it possible to use a mapbox subplot to display an image layer that is dynamically gener...
Opengraph URL: https://github.com/plotly/plotly.js/issues/4399
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ENH: provide mapbox viewport coordinates in relayout data","articleBody":"I would like the mapbox subplot relayout data to include the `lon`/`lat` of the viewport corners. This would make it possible to use a mapbox subplot to display an image layer that is dynamically generated for the current viewport.\r\n\r\nThe relayout data currently includes `mapbox.center`, `mapbox.zoom`, `mapbox.bearing`, and `mapbox.pitch`. I would like to propose that we include a `mapbox.coordinates` property that contains an array of the lon/lat coordinates of the four corners of the viewport. \r\n\r\nThis would match the `coordinates` property that is expected in `image` layers. See https://docs.mapbox.com/mapbox-gl-js/example/image-on-a-map/. \r\n\r\nThese points can be generated from the mapbox API by following the example in \r\nhttps://github.com/mapbox/mapbox-gl-js/issues/2375#issuecomment-204297638.\r\n\r\nQuestion:\r\nCould `coordinates` be something that is added only to `relayout` data, or would it need to be a new figure property as well? The reason it's not clear to me that it should be a property is that it would be read-only. I don't think we could really support setting `coordinates` as a way to set where to place the viewport (at least in the case of non-zero `bearing` and `pitch`).\r\n","author":{"url":"https://github.com/jonmmease","@type":"Person","name":"jonmmease"},"datePublished":"2019-12-02T18:45:21.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/4399/plotly.js/issues/4399"}
| 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:18c3aeea-3a2d-daa1-8511-065f4c18e8b8 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ECAA:ECF3D:264CB37:37112FC:6A57B24B |
| html-safe-nonce | f99af9500b77c591362b34123ad78db52d64082acd1f0cdd02a141ddd92fa225 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQ0FBOkVDRjNEOjI2NENCMzc6MzcxMTJGQzo2QTU3QjI0QiIsInZpc2l0b3JfaWQiOiI1MTExOTU5OTE1MzE0MjYyNjA0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | c49c5d49ccf79d4109073b51095a632658166f491b0fca7fcebf22ed6ee2e63f |
| hovercard-subject-tag | issue:531428065 |
| 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/4399/issue_layout |
| twitter:image | https://opengraph.githubassets.com/15e694c47d312c898b2da6e57b4ed6cc0608d33c9deba6ef394e01eac38017ab/plotly/plotly.js/issues/4399 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/15e694c47d312c898b2da6e57b4ed6cc0608d33c9deba6ef394e01eac38017ab/plotly/plotly.js/issues/4399 |
| og:image:alt | I would like the mapbox subplot relayout data to include the lon/lat of the viewport corners. This would make it possible to use a mapbox subplot to display an image layer that is dynamically gener... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jonmmease |
| hostname | github.com |
| expected-hostname | github.com |
| None | 899c314dfde9abcf8fc1fe8c04f09866b347ea06f43166d653afc482795c9fca |
| 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 | 67aa73f3bba9e68b2de0ebe01c65fcd120461cba |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width