Getting coordinates of marker from Folium using PyQt6

Hello there,

I recently started using PyQt6. I am using Folium to make a map which I then embed into a QWebView widget to display. I am trying to make it so that the program will receive coordinates from the plane and place a marker on the map to show its position. Adding the markers for the new position works, however, I am unable to remove them. Googling has led me to using feature groups and layers, but I can’t seem to make either work. Would appreciate any guidance on this.

TIA