I have this Array
numbers1: any=[
{ lat: 43.477254, lng: -3.780953 },
{ lat: 43.472739, lng: -3.781039 },
{ lat: 43.472498, lng: -3.780164 },
{ lat: 43.472023, lng: -3.780363 }
];
I want to fill that array dynamically, and I got it in this way:
list:any[]=[];
polygon(event){
this.list = [event.coords.lat, event.coords.lng];
this.number.push(this.list);}
But how can I set the values using the structure of Array number1?
{ lat: value, lng: value },
I've tried it but I have not got it. And Sorry by the way, im new on this.
any. For example, for that array of lat/lng coordinates, you might create a simpleCoordclass withlatandlngproperties, then declarenumbersto have the typeCoord[].this.numbers,this.list, andthis.number?