Skip to content

Instantly share code, notes, and snippets.

@timdeschryver
Created November 3, 2019 16:36
Show Gist options
  • Save timdeschryver/30e08c46f0602adef10bc67a1dde6788 to your computer and use it in GitHub Desktop.
Save timdeschryver/30e08c46f0602adef10bc67a1dde6788 to your computer and use it in GitHub Desktop.
<google-map
height="500px"
width="100%"
[zoom]="zoom"
[center]="center"
[options]="options"
(mapClick)="click($event)"
>
<map-marker
#markerElem
*ngFor="let marker of markers"
[position]="marker.position"
[label]="marker.label"
[title]="marker.title"
[options]="marker.options"
(mapClick)="openInfo(markerElem, marker.info)"
>
</map-marker>
<map-info-window>{{ infoContent }}</map-info-window>
</google-map>
<button (click)="zoomIn()">Zoom in</button>
<button (click)="zoomOut()">Zoom out</button>
<button (click)="logCenter()">Log center</button>
<button (click)="addMarker()">Add marker</button>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment