Mapbox "fitBounds" handling
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 2.7k
- Forks
- 641
- PR merge metrics
- No merged PRs in 30d
Description
I believe the if(!args) check should be changed (or the parameter for args should default to null or some other calculated default, not {}) as it currently causes an "e is undefined" error in mapbox (where e is the 2nd parameter).
I've got around it by explicitly providing a mapbox = list(_fitBounds = list(c(xmin, ymin), c(xmax, ymax)), options = list()) entry in my plotly::layout call.
This also serves as a reminder that the fitBounds doesn't seem to work for restyle either.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with inst/htmlwidgets/plotly.js lines 206-220, focusing on the fitBounds argument default and the Mapbox call that produces the undefined second-parameter error. Reproduce the issue with and without an explicit mapbox options list, then verify that fitBounds also works during restyle.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, r
- Domain
- data-visualization, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100