How to fill marker by result of latitude and longitude from json result? using angular 7 ?
- this.partDetailsService.getLocationData(locationArr).subscribe(res => { console.log(res); res.forEach((item, index) => { var dataLocation = res[index]['_source']['GPS1']; console.log(dataLocation); var locationsLatLng = dataLocation.split(','); console.log(locationsLatLng); });
I have foreach loop get GPS1 latitude and longitude from service return latitude and longitude based on array of locationsId then store it separated by comma , on variable locationsLatLng (lat,lng) as following :
How to file marker by latitude and longitude by values exist on locationsLatLng
- markers: marker[] = [ { lat: ?, lng: ? }