<pre lang="HTML">
myFunc() { this.x = document.getElementById('hideDiv'); this.y = document.getElementById('myDiv'); if (this.y.style.display == 'none') { // this.x.style.display='none'; this.y.style.display = 'block'; } else { this.x.style.display = 'block'; this.y.style.display = 'none'; } } mapPopup(Event: any): void { // if(!this.userDetails){ this.data = { company_id : 166, vehicle_id : 1242 }; /* }else{ this.data02 = { "company_id": this.userDetails.company_id, "vehicle_id" : this.userDetails.vehicle_id } }*/ // console.log(this.data, '>>>>>', this.userDetails); this.dashboardService.getTotalFleetPopup(this.data).subscribe(item => { console.log('item is populated>>>>', item); this.responseData = item; // this.date1= new(this.responseData.stoppage_details.end_time); // tslint:disable-next-line:max-line-length // console.log(this.responseData.stoppage_details[0].start_longitude, '<<<<how is the lat and long', this.responseData.stoppage_details[0].start_latitude); this.responseData.stoppage_details.forEach((latAndLong: any) => { this.lat = latAndLong.start_latitude; this.long = latAndLong.start_longitude; this.zoom = 4; this.latAndLong1 = Array(latAndLong); console.log('lat', latAndLong); // console.log('long', this.long); // tslint:disable-next-line:no-unused-expression return this.lat, this.long, this.zoom; }); console.log(this.long, 'long', this.lat); // console.log('resp>>>>>', this.responseData.stoppage_details); }); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)