made looping markers

This commit is contained in:
piratefinn 2017-09-27 14:34:46 +01:00
parent 1eb79aa047
commit b59351addf
2 changed files with 29 additions and 1 deletions

View file

@ -22,7 +22,16 @@
[zoom]="zoom"
[scaleControl]="true"
(idle)="viewBoundsChanged($event)">
<agm-marker [latitude]="lat" [longitude]="lng"></agm-marker>
<agm-marker
*ngFor="let m of markers"
[latitude]="m.lat"
[longitude]="m.lng"
[label]="m.label">
<agm-info-window>
<strong>{{m.label}}</strong>
</agm-info-window>
</agm-marker>
</agm-map>
</div>
</div>