This repository has been archived on 2023-08-16. You can view files and clone it, but cannot push or open issues or pull requests.
FoodLoop-Web/src/app/dashboard/map.component.html

42 lines
1.4 KiB
HTML
Raw Normal View History

2017-09-26 16:31:40 +00:00
<div class="animated fadeIn">
<div class="row">
<div class="col-lg-12">
<div class="card">
<div class="card-header">
<strong>Supplier Map</strong>
<small>Required Data marked in <strong>bold</strong>.</small>
</div>
2017-09-27 12:54:10 +00:00
<div [ngSwitch]="dataReceived">
<div *ngSwitchCase="'no'"class="card-block">
<div class="alert alert-danger" role="alert">
No map data received, check your connection.
</div>
</div>
<div *ngSwitchCase="'yes'">
<!-- this creates a google map on the page with the given lat/lng from -->
<!-- the component as the initial center of the map: -->
<agm-map
(mapReady)="onMapReady($event)"
[latitude]="lat"
[longitude]="lng"
[zoom]="zoom"
[scaleControl]="true"
(idle)="viewBoundsChanged($event)">
2017-09-27 13:34:46 +00:00
<agm-marker
*ngFor="let m of markers"
2017-09-27 16:46:25 +00:00
[latitude]="m.latitude"
[longitude]="m.longitude"
[label]="m.name[0]">
2017-09-27 13:34:46 +00:00
<agm-info-window>
2017-09-27 16:46:25 +00:00
<strong>{{m.name}}</strong>
2017-09-27 13:34:46 +00:00
</agm-info-window>
</agm-marker>
2017-09-27 12:54:10 +00:00
</agm-map>
</div>
</div>
2017-09-26 16:31:40 +00:00
</div>
</div>
</div><!--/.row-->
</div>