Skip to content

Instantly share code, notes, and snippets.

@geykel
Last active August 10, 2017 14:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save geykel/69d0058ef9cb11290880ff44cc399166 to your computer and use it in GitHub Desktop.
Save geykel/69d0058ef9cb11290880ff44cc399166 to your computer and use it in GitHub Desktop.
import { Component, ViewChild, ElementRef } from '@angular/core';
import { GoogleMaps } from '../../providers/google-maps/google-maps';
@Component({
selector: 'page-home',
templateUrl: 'home.html'
})
export class HomePage {
@ViewChild('map') mapElement: ElementRef;
constructor(public maps: GoogleMaps) {
}
ionViewDidLoad() {
this.maps.init(this.mapElement.nativeElement, (latLng) => {
console.log(latLng.lat() + ', ' + latLng.lng());
}).then(() => {
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment