TomSchimansky / TomSchimansky/TkinterMapView

attribution inclusion and support for folium maps

Open
#134 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
743
Forks
110
PR merge metrics
No merged PRs in 30d

Description

I am unable to add folium map inside tkinter widget but unable to do so. Basically I need to add attribution in the displayed maps which I am unable to do in default map tiles of tkintermapview. Can anyone guide plz.
``
import tkinter
import folium
import tkintermapview

root_tk = tkinter.Tk()
root_tk.geometry(f"{800}x{600}")

public_provider = folium.TileLayer(
tiles='https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}',
name="Esri World Imagery",
attr='Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community'
)
m = folium.Map(location=[30.7175, 76.7693], zoom_start=16, tiles=public_provider)

m.save("F:/py2exedata/map.html")

map_widget = tkintermapview.TkinterMapView(root_tk, corner_radius=0)
map_widget.set_tile_server("file:///F:/py2exedata/map.html", max_zoom=22)
map_widget.pack(side="top", fill="both", expand=True)

root_tk.mainloop()
``

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the example with tkintermapview.TkinterMapView and set_tile_server using the generated folium map. Determine how attribution from the folium TileLayer should appear in the widget, then verify that the displayed map includes the requested attribution and supports the shown tile setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
desktop
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.