Last active
June 28, 2017 13:11
-
-
Save matthieu-D/392b01a59da06cc73ae448ac3dde744a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
initMap() { | |
let map: GoogleMap = this.googleMaps.create(this.element.nativeElement); | |
map.one(GoogleMapsEvent.MAP_READY).then((data: any) => { | |
let coordinates: LatLng = new LatLng(33.6396965, -84.4304574); | |
let position = { | |
target: coordinates, | |
zoom: 17 | |
}; | |
map.animateCamera(position); | |
let markerOptions: MarkerOptions = { | |
position: coordinates, | |
icon: "assets/images/icons8-Marker-64.png", | |
title: 'Our first POI' | |
}; | |
const marker = map.addMarker(markerOptions) | |
.then((marker: Marker) => { | |
marker.showInfoWindow(); | |
}); | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment