Skip to main content
TkinterMapView logoTkinterMapView logo

TkinterMapView is a map widget for tkinter and CustomTkinter. It shows an interactive map, which you can move with the mouse and zoom with the mouse wheel, like a map in the browser. By default the map comes from OpenStreetMap, but you can use any other tile server, for example Google Maps or Google satellite images. A second tile server can draw an overlay on top of the map, like the sea marks of OpenSeaMap.

On the map you can place markers with a text, an image or your own icon, draw paths and polygons, and react to clicks on the map and on the markers. Addresses can be converted to coordinates and back, so the map can also be moved to a place by its name. If your app has to work without an internet connection, the tiles of an area can be downloaded into a database first and are then loaded from there.

The map is a normal tkinter widget and is placed with grid, pack or place like all other widgets. So it fits into a CustomTkinter app with buttons, entries and frames around it. The window below is map_with_customtkinter.py from the examples of TkinterMapView:

TkinterMapView map with CustomTkinter buttons, entry and slider in dark mode on macOS

Installation​

TkinterMapView is installed with pip:

pip install tkintermapview

The tutorials need version 1.32 or newer. If you already have an older version, update it with pip install --upgrade tkintermapview. More examples and a short description of all methods are in the readme on GitHub.

Tutorials​

The tutorials start with a simple map in a CTk window and add a bit more in every part: markers with your own icons, click events and a right click menu, and at the end other tile servers and overlays.