TkinterMapView icon indicating copy to clipboard operation
TkinterMapView copied to clipboard

Question: delete a marker?

Open Tom1954 opened this issue 3 years ago • 1 comments

When a marker is activated by pressing the mouse, what name will it get? Can this name be used directly to to delete the marker by "marker".delete?

Tom1954 avatar Jun 10 '22 06:06 Tom1954

Update: ... I didn't realize, his examples are awesome, definitely check that out first on delete marker

Instead just create your own marker function and then you'll know what the name of the marker is to delete. Seems like the dev here created all the functionality for you to go off and use the modules and go nuts. Example of what i've done with this, I add and delete markers and display airports for a simulation, this is Normandy. Set Marker: self.marker_airport = map_widget.set_marker(latlong[0], latlong[1], text=self.marker_name, text_color=self.coalition_side, marker_color_circle=self.marker_color_circle, marker_color_outside=self.marker_color_outside) Delete Marker: self.marker_airport.delete() Note: I'm lazy just take all the "self" out ... I was using this in a class ... hope this all helps image

techdr1ve avatar Jun 27 '22 04:06 techdr1ve