How to add movement speed to app

Dears is there any way to add gps information realtime position movement speed direction.?

Look at the Geolocation Plugin for this. Note: active tracking can be a battery drain, so be aware of that.

In this code I’m using Geolocation to access the position of device and add marker, but marker is not moving or replacing with device movement.

initializeMap() {
  var minZoomLevel=16
Geolocation.getCurrentPosition().then((position) => { = new google.maps.Map(document.getElementById('map_canvas'),
zoom: minZoomLevel,
center: new google.maps.LatLng(position.coords.latitude, position.coords.longitude),
mapTypeControl: false,
streetViewControl: false,
disableDefaultUI: true,
mapTypeId: google.maps.MapTypeId.ROADMAP

var trafficLayer = new google.maps.TrafficLayer();



   let image = 'assets/img/Untitled-1.png';   
   let marker = new google.maps.Marker({    
    animation: google.maps.Animation.DROP,
   // draggable: true,
    icon: image