How can save my locations using Background Geolocation to print map with points

Hello,everyone .
Hello,everyone .

I want to tracking the user app even Background mode.

I’ve followed this tutorial :

And I’ve modified some things like :

1.Create model to save locations
2. I’ve add the location to my array inside : , like this : => { = location.latitude;
this.lng = location.longitude;
console.log(“ZONE 1”);
let newLocation: location = {
lat: location.latitude,
lng: location.longitude

  1. When user click on Stop Tracking, i want to print with alert all locations tracked.

I am not sure if I should added the locations inside , i’ve tried put that outside(before of but it fails too)

Any idea about that ?

My code project is :

I would like to integrate thr project using this tutorial too: