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

OSM: Smooth navigation #39

Closed
HuidaeCho opened this issue Jul 11, 2021 · 3 comments
Closed

OSM: Smooth navigation #39

HuidaeCho opened this issue Jul 11, 2021 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@HuidaeCho
Copy link
Owner

HuidaeCho commented Jul 11, 2021

  • Tile caching
  • Multithreaded downloads
  • Partial zoom levels between integers using scaled tiles
  • Zoom first using the current tiles and switch to the new image later (double buffering)
@HuidaeCho
Copy link
Owner Author

HuidaeCho commented Jul 17, 2021

Tried multi-threading, but the canvas flicked too much. Also, it got stuck on thread.join() when I tried to cancel previous zoom events. Tkinter doesn't like threading. Used canvas.after() and canvas.after_cancel() to cancel subsequent zoom events in 9eced7c.

@HuidaeCho
Copy link
Owner Author

Partial zoom is impossible using tkinter's Canvas or PhotoImage. PhotoImage's zoom() and subsample() only take integer scales, and rescaling a canvas only rescales vector objects, not images. I tested both myself.

@HuidaeCho
Copy link
Owner Author

Zooming is fast enough on my machine, so double buffering is not really needed or its effect may not be noticeable on the dev machine. Anyway, I found that tkinter canvas is always double-buffered according to https://mail.python.org/pipermail/python-list/2001-March/090344.html.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant