How to get gps1 for every locations as following :

locationArr=[40871, 60009, 38149, 40868, 43240, 15299, 53897, 40976, 38151, 
23183, 38152, 78579, 23180, 40977, 23176, 39565, 40884, 15298, 38147, 
40966, 39669]  

every number represent locationId

I need to pass 21 LocationId   to get 21 GPS1 latitude and longtude .
I can get it one for one locationId 

getLocationData(id: number) {  
console.log("server "+id)  
return this.http.get('http://192.168.7.45:9200/location/_doc/'+id);  

}  
 
 
this.partDetailsService.getLocationData(this.LocationId).subscribe(res => { 
         
         this.dataLocation = res['_source']['GPS1'];     
         var loc = this.dataLocation.split(',');      
         this.lat = loc[0].trim();    
         this.lng = loc[1].trim();  

 But cannot get locationId for 21 location id 
 
so that i need to put code above on for  to array of location Id 
 
How to make loop to get values of GPS 1 latitude and longitude to every 
Location Id from array above
 
meaning i will get GPS1 21 Time .
 
every location Id have GPS1 
 
How to do that please 
 
 i need to replace array of location Id in place of
 
this.locationId 
 

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/angular/a4e14437-cf1e-4202-b7e7-6ad1dfda22de%40googlegroups.com.

Reply via email to