problem
How to display more than one location on google map using angular 7 ?
I get result of 5 points I need to display on google map
every point represent latitude and longitude for every location I need to display it .
but my problem how to display these points on google map
my code as below
Step 1 : on html component
<agm-map
[latitude]="lat"
[longitude]="lng"
[zoom]="zoom"
[disableDefaultUI]="false"
[zoomControl]="false">
<agm-marker
*ngFor="let m of markers;"
[latitude]="m.lat"
[longitude]="m.long"
>
</agm-marker>
</agm-map>
step2 :on component.ts
export class ManagelocationsComponent implements OnInit, AfterViewInit {
this.partDetailsService.getLocationData(locationArr).subscribe(res => {
res.forEach((item, index) => {
let dataLocation = res[index]['_source']['GPS1'];
})
//how to display points result on google map
console.log("dataLocation values is" + dataLocation);
Result points for latitude and longitude from browser for datalocation
dataLocation is
5.2951916,100.28825170000005,
30.788892,120.632503,
13.658933,100.634069,
10.328074,123.983185,
31.332119,120.723465