TomSchimansky / TomSchimansky/TkinterMapView

Enhancment - Marker rotation via setposition

Open
#91 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

Hello

Is it possible to add a rotation argument to setposition?

Currently I'm rotating a marker (to represent bearing) by invoking ImageTK.PhotoImage(Image.open(img.png).rotate(int)

I'm using left click event and random.randint as placeholders to trigger the functions.

Example code:

def left_click_event(coordinates_tuple):
print("Left click event with coordinates:", coordinates_tuple)
my_pos.set_position(coordinates_tuple[0], coordinates_tuple[1])
my_pos.change_icon(update_icon())

def update_icon():
global current_path
new_heading = random.randint(0, 360)
marker_img = ImageTk.PhotoImage(Image.open(os.path.join(current_path, "diamond2.png")).rotate(new_heading).resize((60, 60)))
return marker_img

Apologies if I'm going about this in entirely the wrong way. I'm still kinda new at this.

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 tracing set_position and change_icon in the marker implementation to understand how position and images are updated. Check how image rotation could be passed through that flow, then verify that a marker can receive a heading and display the rotated image without breaking existing calls.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.