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

Zoom in and out #9

Open
yashkotadia opened this issue Mar 7, 2018 · 5 comments
Open

Zoom in and out #9

yashkotadia opened this issue Mar 7, 2018 · 5 comments

Comments

@yashkotadia
Copy link

yashkotadia commented Mar 7, 2018

This is a feature request. Zooming in and out is essential to visualizing data on different scales. Is there a way to incorporate the same in mapsplotlib as well?

@tcassou
Copy link
Owner

tcassou commented Mar 10, 2018

Hi @yashkotadia,

Thanks for suggesting! In the current state, this package relies on the Google Static Maps API, which renders static images, on which the markers or other plots are drawn. So nothing very dynamic (at least yet)!
Could you elaborate a bit more on how that would look like to you, for me to see if there's a good way to do it? Or maybe you have an idea in mind already?
If there's an intuitive way to zoom in and out of the plot (never played with that), then we should be able to dynamically update the background map too.

Thanks!

@yashkotadia
Copy link
Author

yashkotadia commented Mar 10, 2018

image

I don't have any idea about the implementation, however, the scale at the bottom right of the picture uploaded is what I am referring to.

@tcassou
Copy link
Owner

tcassou commented Mar 16, 2018

Thanks @yashkotadia for clarifying.
Given the static aspect of the maps currently used, not sure it would be straightforward..! I'll see if I can think of something, also feel free to work on a PR if you have ideas!

@ChakChak1234
Copy link

Hey @yashkotadia and @tcassou

I came across an idea while working on my project related to #12: Is it a viable option to specify a specific zoom by rounding down a zoom value and then cropping out the edges? For example, let's say you want zoom = 3.5, which can be achieved by setting the value zoom = 3 then cropping out the edges? I understand that the zoom value impacts the number of pixels in each longitude/latitude crossings.

@tcassou
Copy link
Owner

tcassou commented Sep 10, 2018

Thanks for the suggestion! Not sure what this would look like, given the relatively poor default resolution.
I think what @yashkotadia was suggesting is a dynamic way to zoom in/out (see picture), which is tricky with static maps/plots. This could be done with widgets in Jupyter, but it would not work outside it for example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants