import { Component, OnInit } from '@angular/core';
import { Location } from '@angular/common';
import { Geolocation } from '@ionic-native/geolocation/ngx';
import { } from 'googlemaps';

@Component({
	selector: 'app-near',
	templateUrl: './near.page.html',
	styleUrls: ['./near.page.scss'],
})
export class NearPage implements OnInit {
	user_location = {
		lat: 0,
		lng: 0
	};

	constructor(
		private location: Location,
		private geolocation: Geolocation
	) { }

	ngOnInit() {
		// this.geolocation.getCurrentPosition().then((resp) => {
		// 	this.user_location = {
		// 		lat: 12.962690,
		// 		lng: 77.523338
		// 	};
		// }).catch((error) => {
		// 	console.log('Error getting location', error);
		// });
		// let map = new google.maps.Map(document.getElementById('map'), { zoom: 10, center: this.user_location });
		// let marker = new google.maps.Marker({ position: this.user_location, map: map });
	}

	back() {
		this.location.back();
	}

}
