Leaflet How To Update User Position Marker Real Time

#1

I am trying to update user position in leaflet.Like when user walks with phone their location marker will move too based on location data just like google maps.

Right now im just putting a custom marker on their initial position

this.map.locate({
        setView: true,
        maxZoom: 120,
        watch:true,
        enableHighAccuracy:true
      }).on("locationfound", e => {
          if (!usermarker) {
    
            if(this.profileData.avatar == "https://i.hizliresim.com/zJJ239.png"){
              usermarker = new L.marker(e.latlng,{icon : ayi}).addTo(this.map);
            }else if(this.profileData.avatar == "https://i.hizliresim.com/mJJrkP.png"){
              usermarker = new L.marker(e.latlng,{icon : ironman}).addTo(this.map);
            }else if(this.profileData.avatar == "https://i.hizliresim.com/vJJQpp.png"){
              usermarker = new L.marker(e.latlng,{icon : dino}).addTo(this.map);
            }else if(this.profileData.avatar == "https://i.hizliresim.com/zJJ2B9.png"){
              usermarker = new L.marker(e.latlng,{icon : petyr}).addTo(this.map);
            }
          } else if(this.profileData.avatar == "https://i.hizliresim.com/zJJ239.png") {
              usermarker.setLatLng(e.latlng);
          }
      }).on("locationerror", error => {
          if (usermarker) {
              map.removeLayer(usermarker);
              usermarker = undefined;
          }
      });
#2

Hi!
Did you figure this out @lifesuxtr?

thanks!