Successive markers with navigator.geolocation.watchPosition
问题 I use Leaflet and OpenStreetMap. In addition, I send geolocation data with socket.io in nodejs. The position of the user is displayed successfully with the code: navigator.geolocation.getCurrentPosition(.........) Now I want the position of the user is updated on the map every X seconds. So I replaced the code: navigator.geolocation.watchPosition(.........) My problem is that a new marker is added geolocation every X seconds, and the oldest markers are not removed. Could someone help me