locatePosition(){ this.map.locate({setView:true}).on("locationfound", (e: any)=> { this.newMarker = marker([e.latitude,e.longitude], {draggable: true}).addTo(this.map); this.newMarker.bindPopup("You are located here!").openPopup(); this.newMarker.on("dragend", ()=> { const position = this.newMarker.getLatLng(); }); }); }