Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do you just set the origin/center longitude and latitude to a particular area? #80

Closed
CMCDragonkai opened this issue Aug 27, 2016 · 4 comments

Comments

@CMCDragonkai
Copy link

The documentation doesn't show a basic example for this?

@pbugnion
Copy link
Owner

At the moment, there is no programmatic way to do this. If you add data to the map, e.g. through a heat map, the map will be automatically centered and zoomed to fit the data.

PRs for adding a way to set the centre and zoom welcome! I was thinking of something like:

m = Map(zoom=8, centre=[-5.0, 5.0], centre_on_data=False)

@CMCDragonkai
Copy link
Author

So I will just create 1 single data point heatmap?

@pbugnion
Copy link
Owner

pbugnion commented Aug 28, 2016

That's not what I'm suggesting -- I was just thinking through what an interface allowing you to set the zoom and centre might look like.

At the moment you just can't set the centre and zoom programatically, though I suppose you could build a transparent heat map (set opacity=0.0) with two points that happen to give you the right centre and zoom. Finding those two points would be tricky. It's probably easier and more fun to just build the code to allow Map to take a centre and zoom and submit a PR than it is to fiddle around trying to find workarounds.

@pbugnion
Copy link
Owner

pbugnion commented Sep 4, 2016

Close in favour of #83 .

@pbugnion pbugnion closed this as completed Sep 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants