plotly / plotly/plotly.py

provide parameter to set lat/long ranges of current view with tile maps

Open
#4,753 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature P3
Dominant language
Python
Stars
18.8k
Forks
2.8k
Avg merge
16h 26m
Merged PRs (30d)
21

Description

Hello Plotly Team!

I have a feature request for the tile-maps.
As a worked on Figure Friday week 35 with the people map dataset, I noticed that it is currently quite hard to set the lat/lon ranges to have a nice view of the map, specially if we want a responsive app or if the data changes.

Currently, if I didn't miss the right parameters , we can use the layout params map_center + map_zoom, like:

map={
    'center': {'lat': 40, 'lon': -115}, 
    'zoom': 3,
},

Is it possible to have a parameter similar to:
https://plotly.com/python/reference/layout/#layout-map-bounds
to set the lat/lon ranges of the current view, not the min/max?

And maybe it would be also nice to have a parameter similar to
https://plotly.com/python/reference/layout/geo/#layout-geo-fitbounds
used for the geo maps (outline maps), to auto set the ranges to fit the traces data of the figure.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the layout map parameters named in the issue—map.center, map.zoom, and the linked layout.map.bounds reference—then compare them with geo.fitbounds. Define how current-view latitude/longitude ranges and automatic fitting to trace data should behave for responsive or changing figures; done means the requested behavior is specified and supported consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-visualization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.