-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
62 lines (56 loc) · 2.99 KB
/
index.html
File metadata and controls
62 lines (56 loc) · 2.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<html ng-app="googlePlaces">
<head>
<title>Locations</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyA8iBZcEhmC4z-cVHYYenLxZl7Kl4qlCGQ&libraries=places"></script>
<script src="./bower_components/angular/angular.js"></script>
<script src="./app/build/all.js"></script>
<script src="./bower_components/ngmap/build/scripts/ng-map.min.js"></script>
<script src="./bower_components/angular-bootstrap/ui-bootstrap.min.js"></script>
<script src="./bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600" rel="stylesheet">
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" href="./app/build/main.css">
</head>
<body ng-controller="MapController as vm">
<div class="list-wrapper" ng-class="{ expanded : vm.placeList.length > 1 }">
<input id="search-bar" ng-disabled="!vm.mapLoaded" places-auto-complete on-place-changed="vm.search()" placeholder="Search..."/>
<div ng-if="vm.placeList.length > 1">
<hr>
<div class="list-group sidebar" id="places">
<div ng-repeat="place in vm.placeList">
<a href="javascript:void(0)" class="list-group-item" ng-click="vm.setActive($event, $index)" ng-class="{active : vm.activeItem === $index}">
<h5 class="mb-1 font-weight-bold header">{{place.name}}</h5>
<div ng-if="place.rating">
<div class="label-small label-theme-default">{{place.rating}}</div>
<span uib-rating ng-model="place.rating" read-only="true"> </span> <br>
</div>
<small ng-if="place.price_level" class="text-muted"> {{'$'.repeat(place.price_level)}} • </small>
<small class="text-muted"> {{place.formatted_address}} </small>
</a>
</div>
</div>
</div>
<br>
<small ng-if="vm.placeList.length > 1" class="text-muted list-pagination"> Displaying {{vm.placeList.length}} results </small>
</div>
<ng-map on-tilesloaded="vm.setMapLoaded()" center='current-position' geo-fallback-center="[40.74, -98.6]" geo-callback="vm.setUserLocation()" zoom="6">
<div ng-repeat="marker in vm.markers">
<marker
id="marker-{{marker.id}}"
position="{{marker.lat}}, {{marker.lng}}"
on-click="vm.setActive(marker.id)">
</marker>
</div>
<info-window id="marker-info" on-closeclick="vm.onCloseMarker()">
<div ng-non-bindable="">
<h5>{{vm.selectedMarker.title}}</h5>
<div ng-repeat="field in vm.selectedMarker.address">
{{field}}
<br/>
</div>
</div>
</info-window>
</ng-map>
</body>
</html>