TomSchimansky / TkinterMapView

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

Differentiating clicking on marker vs clicking on map #90

Open gregws2 opened 1 year ago

gregws2 commented 1 year ago

Hiya,

Thank you for the work you have done to produce these map functions. I am encountering an issue where at times, clicking on a marker triggers the map_widget.add_left_click_map_command() event.

Ultimately I would like to be able to achieve clicking on a marker to select it, then clicking on an empty map space to deselect it. On first selection it works as intended, but each subsequent click on a marker then triggers the "deselection" which in turn removes the selection.

As an example; Click on a marker, it shows the paths from 1 marker to the next. Then clicking an empty space clears the drawn paths.

Hope that is making sense.

Thanks,