TomSchimansky / TkinterMapView

A python Tkinter widget to display tile based maps like OpenStreetMap or Google Satellite Images.
Creative Commons Zero v1.0 Universal
621 stars 85 forks source link

Using PyInstaller #72

Closed amamic1803 closed 1 year ago

amamic1803 commented 1 year ago

Hi, does this work with PyInstaller --onefile ? I've seen that it installs CustomTkinter as dependency, but on repo for CustomTkinter it is said that it does not work with --onefile. I don't need any CustomTkinter functionality, just want this TkinterMapView widget, but I'm using --onefile. Also, is it possible to set like map edges? I don't want to let user move map to the Antarctica, just want to let the map be moved/zoomed within certain area. Thanks

twintersx commented 1 year ago

@DarkLord76865 would also like to use PyInstaller. Have you found a solution?

amamic1803 commented 1 year ago

@DarkLord76865 would also like to use PyInstaller. Have you found a solution?

I unfortunately don't have time to check if it works with PyInstaller or not. If it doesn't, I will just try to switch to Pyside6 instead of tkinter. It will be a learning curve, but it is probably more future proof than tkinter. (I have seen that there are map objects for qt)

amamic1803 commented 1 year ago

@DarkLord76865 would also like to use PyInstaller. Have you found a solution?

I've tried it out, it mostly works correctly with PyInstaller --onefile. That said the only thing that doesn't work is the only thing that is dependent on custom tkinter, right click menu onto map. In images provided in README.md, right click menu looks super cool, I suppose that it depends on custom tkinter. When I tested I didn't get that fancy right click menu, I just got plain old white windows style menu. Though, I don't mind and will use this library for my project. I even added functionality for using local overlay tiles and put pull request for it, hope it gets accepted.

BlackH033 commented 1 year ago

It works with pyinstaller! I have used pyinstaller several times with tkinterviewmap and customtkinter, and it works correctly.

amamic1803 commented 1 year ago

I think it works well enough with PyInstaller. Closing the issue.