Zoom in and out
Opened this issue · 5 comments
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?
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!
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!
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.
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.