title: simplest way to get current location in Angular 2 Google Maps (AGM Core)
body: <p>This question may have a duplicate or the answer that I want has already been answered in some other questions but I'll still ask anyways.. This is a very basic question but I also want the easiest(simplest) way of how to achieve this</p>
  
  <p>What I want to do is get the current Location of the device in which my app was executed.. I've seen other answers using geolocation but I can't quite understand how to implement it to AGM because I'm quite new to ionic and angular, and I was wondering if there may be a more simple way to achieve this...</p>
  
  <p>Your answers will be highly appreciated</p>
  
  <p>Here's my code:
   HTML</p>
  
  <pre><code>  &lt;ion-header&gt;
  
    &lt;ion-navbar&gt;
      &lt;ion-title&gt;viewmapings&lt;/ion-title&gt;
      &lt;ion-buttons end&gt;
        &lt;button ion-button (click)="onClose()"&gt;Close&lt;/button&gt;
      &lt;/ion-buttons&gt;
    &lt;/ion-navbar&gt;
  
  &lt;/ion-header&gt;
  
  
  &lt;ion-content padding&gt;
    &lt;agm-map 
     [latitude]="lat"
     [longitude]="lng" 
     (mapClick)="onClickLoc($event)"
     [disableDoubleClickZoom] = "true"
     [streetViewControl] = "false"
      [zoom]="15"&gt;
  
      &lt;agm-marker
       [latitude]="clickedLat" 
       [longitude]="clickedLng" 
       *ngIf="selected"&gt;
       &lt;agm-info-window&gt;Lat: {{clickedLat}} &lt;br&gt; Lng: {{clickedLng}}&lt;/agm-info-window&gt;
      &lt;/agm-marker&gt;
  
    &lt;/agm-map&gt;
  &lt;/ion-content&gt;
  </code></pre>
  
  <p>SCSS:</p>
  
  <pre><code>page-viewmapings {
      agm-map{
          height: 100%;
      }
  }
  </code></pre>
  
  <p>TS:</p>
  
  <pre><code>import { Component } from '@angular/core';
  import { IonicPage, NavController, ViewController } from 'ionic-angular';
  
  
  @IonicPage()
  @Component({
    selector: 'page-viewmapings',
    templateUrl: 'viewmapings.html',
  })
  export class ViewmapingsPage {
  
    lat: number = 51.678418;
    lng: number = 7.809007;
    clickedLat: number;
    clickedLng: number;
    selected =  false;
  
    constructor(public navCtrl: NavController, public viewCtrl: ViewController) {
    }
  
    ionViewDidLoad() {
      console.log('ionViewDidLoad ViewmapingsPage');
    }
  
    onClickLoc(event){
      this.clickedLat = event.coords.lat;
      this.clickedLng = event.coords.lng;
      this.selected = true;
    }
  
    onClose(){
      this.viewCtrl.dismiss()
    }
  
  }
  </code></pre>