TomSchimansky / TomSchimansky/TkinterMapView

Coordinate conversion error

Open
#124 1 comment 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

First of all, I am very grateful to the author of this code (Tom Schimansky).

And I want to share my experience of using it.
I found a bug in the convert_canvas_coords_to_decimal_coords function.

Screen size (self.height ; self.width) is different from canvas size (self.canvas.winfo_height() ; self.canvas.winfo_width()) and we have to use screen size in it.
Otherwise, there may be displacements along the axes that affect the display of coordinates (right mouse button).

It was the incorrect display of coordinates that I encountered. And, unfortunately, it took a lot of time to find the root cause.

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 at the convert_canvas_coords_to_decimal_coords function and inspect how it uses canvas dimensions versus screen dimensions. Reproduce the coordinate display issue with differing screen and canvas sizes, then verify that right-click coordinate positions no longer shift along either axis.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
desktop
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.