forked from infocitta/mappadesio_old
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
84 lines (66 loc) · 2.26 KB
/
index.html
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<!DOCTYPE html>
<html ng-app="ngMap">
<head>
<title>Mappa Desio</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootswatch/3.2.0/sandstone/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css">
<script src="https://maps.google.com/maps/api/js?libraries=placeses,visualization,drawing,geometry,places&key=AIzaSyDMQX5Qu93BAwKBvSqO-pzUGMcIpWghu_o"></script>
<script src="https://code.angularjs.org/1.3.15/angular.js"></script>
<script src="https://rawgit.com/allenhwkim/angularjs-google-maps/master/build/scripts/ng-map.js"></script>
<script>
angular.module('ngMap').controller('MyCtrl', function($scope,$http,NgMap) {
NgMap.getMap().then(function(map) {
$scope.map = map;
});
$http.get("poi.json")
.then(function(response) {
$scope.pois = response.data;
});
$scope.showPOI = function(event, poi) {
$scope.selectedPOI = poi;
$scope.map.showInfoWindow('myInfoWindow', this);
};
});
</script>
</head>
<body>
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="#">InfoCittà - Desio</a>
</div>
<ul class="nav navbar-nav">
<li class="active"><a href="#">Home</a></li>
</ul>
</div>
</nav>
<div class="container">
<div class="page-header" style="margin-top: 5px;margin-bottom: 5px;">
<img class="img-responsive" src="https://www.infocitta.info/logo_small.png" style="float: left;height:80px;width:80px;vertical-align: text-top;"/>
<h1>Città di Desio</h1>
<p>Punti di interesse</p>
</div>
</div>
</div>
<div ng-controller="MyCtrl as vm">
<div class="container">
<ng-map default-style="false" zoom="14" center="45.618600, 9.207690" style="height: 600px;">
<info-window id="myInfoWindow" >
<div ng-non-bindable>
<h4>{{selectedPOI.Name}}</h4>
<small>{{selectedPOI.Note}}</small>
</div>
</info-window>
<marker ng-repeat="p in pois"
position="{{p.Position}}" title="{{p.Name}}" id="POI_{{$index}}" on-click="showPOI(event, p)"
icon="{
url:'{{p.Icon}}'
}"
>
</marker>
</ng-map>
</div>
</div>
</body>
</html>