-
Notifications
You must be signed in to change notification settings - Fork 0
/
mappa.html
208 lines (171 loc) · 8.07 KB
/
mappa.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
<!doctype html>
<html lang="it">
<head>
<meta charset="UTF-8">
<title>OpenData - Palermo | Mappa</title>
<link href="./bootstrap/css/bootstrap.css" rel="stylesheet" media="screen">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.4.5/leaflet.css" />
<!--[if lte IE 8]><link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.4.5/leaflet.ie.css" /><![endif]-->
<script src="http://cdn.leafletjs.com/leaflet-0.4.5/leaflet.js"></script>
<link rel="stylesheet" href="./resources/MarkerCluster.css" />
<link rel="stylesheet" href="./resources/MarkerCluster.Default.css" />
<!--[if lte IE 8]><link rel="stylesheet" href="./resources/MarkerCluster.Default.ie.css" /><![endif]-->
<script src="./resources/leaflet.markercluster-src.js"></script>
<script src="http://maps.google.com/maps/api/js?v=3.2&sensor=false"></script>
<script src="./leaflet-plugins-master/layer/tile/Google.js"></script>
<!-- Le styles -->
<style type="text/css">
body {
padding-top: 60px;
padding-bottom: 40px;
}
.map {
height: 100%;
border: 1px solid #a5a5a5;
-moz-box-shadow: 5px 5px 5px #d2d2d2;
-webkit-box-shadow: 5px 5px 5px #d2d2d2;
box-shadow: 5px 5px 5px #d2d2d2;
}
.demo {
height: 450px;
position: relative;
}
.demo .height-controlled {
height: 100%;
}
</style>
<link href="./bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<script src="./ga.js"></script>
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<!-- <a class="brand" href="#">OpenData Palermo</a> -->
<div class="nav-collapse collapse">
<ul class="nav">
<li ><a href="./index.html">Home</a></li>
<li class="active"><a href="./mappa.html">Mappa</a></li>
<li ><a href="./search_engine/index.html">Motore di ricerca</a></li>
<li><a href="./strumenti.html">Strumenti</a></li>
<li ><a href="./dati.html">Dati</a></li>
<li><a href="./credits.html">Ringraziamenti</a></li>
</ul>
<ul class="nav pull-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">TANTO network</a>
<ul class="dropdown-menu">
<li><a href="http://blog.spaziogis.it/">Blog</a></li>
<li><a href="http://planetgis.it/">Planet GIS Italia</a></li>
<li><a href="https://plus.google.com/u/0/communities/100473976195153342745">GEO+</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="page-header">
<h2>Mappa dei siti turistici visitabili di Palermo</h2>
</div>
<div class="row demo">
<div class="span4 height-controlled">
<p>La mappa a destra è dinamica e mostra i siti turistici visitabili di Palermo, estratti dal <em>dataset</em> pubblicato in <strong>OpenData</strong> dal <strong>Comune di Palermo</strong>.</p>
<p>Il dato originale contiene 100 siti, ma qui su carta sono stati rappresentati soltanto quelli a cui era stato associato un indirizzo comprensivo di <strong>numero civico</strong>. Da questa informazione, tramite <em>geocoding</em>, sono state estratte in automatico le coordinate dei siti. Le posizioni su carta pertanto potrebbe non essere corrette.</p>
<p>I siti molto vicini tra loro sono stati raggruppati in <strong><em>cluster</em></strong>.</p>
<a href="./map_bs.html" class="btn btn-large btn-primary" target="_blank">Schermo intero</a>
</div>
<div class="span8 height-controlled">
<div id="map" class="map">
</div>
</div>
</div>
<hr>
<footer>
<p>
<a rel="license" href="http://creativecommons.org/licenses/by/3.0/it/"><img class="pull-left" alt="Licenza Creative Commons" style="border-width:0" src="http://i.creativecommons.org/l/by/3.0/it/88x31.png" /></a><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title"> Questo sito e gli elaborati contenuti</span> sono a cura di <strong>Andrea Borruso</strong> di <strong><a xmlns:cc="http://creativecommons.org/ns#" href="http://blog.spaziogis.it/" property="cc:attributionName" rel="cc:attributionURL">TANTO</a></strong>, e rilasciati sotto licenza <a rel="license" href="http://creativecommons.org/licenses/by/3.0/it/">Creative Commons Attribuzione 3.0 Italia License</a>.
</p>
</footer>
</div>
<script src="./resources/data.js"></script>
<script>
var map = L.map('map');
var acetateUrl = 'http://{s}.acetate.geoiq.com/tiles/acetate/{z}/{x}/{y}.png';
var acetateAttrib = '2011 GeoIQ & Stamen, Data from OSM and Natural Earth';
var acetate = new L.TileLayer(acetateUrl, {maxZoom: 18, attribution: acetateAttrib, subdomains: ['a1', 'a2', 'a3']});
var mapquestUrl = 'http://{s}.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.png',
subDomains = ['otile1','otile2','otile3','otile4'],
mapquestAttrib = 'PinPoint da <a href="http://www.comune.palermo.it/">Comune di Palermo</a> | Data, imagery and map infos by MapQuest, and OpenStreetMap'
var mapquest = new L.TileLayer(mapquestUrl, {maxZoom: 18, attribution: mapquestAttrib, subdomains: subDomains});
var bangalore = new L.LatLng(12.934,77.608);
var ggl = new L.Google("ROADMAP");
map.addLayer(ggl);
var markers = new L.MarkerClusterGroup({ showCoverageOnHover: false,zoomToBoundsOnClick:true});
var punti = L.geoJson( bbccaa,
{pointToLayer: function (feature, latlng) {
if (feature.properties.Tipo == 'ville e giardini') {
var raggio = 4
var colore = "#A6E22E"
var icona = "./resources/urbanpark.png"
var myIcon = L.Icon.extend({
iconUrl: './resources/urbanpark.png'
})
}
if (feature.properties.Tipo == 'chiese e oratori') {
var raggio = 4
var colore = "#F92672"
var icona = "./resources/church-2.png"
var myIcon = L.Icon.extend({
iconUrl: './resources/church-2.png'
})
}
if (feature.properties.Tipo == 'musei e gallerie d\'arte') {
var raggio = 4
var colore = "#FD971E"
var icona = "./resources/art-museum-2.png"
var myIcon = L.Icon.extend({
iconUrl: './resources/art-museum-2.png'
})
}
return new L.Marker(latlng, {
icon: new myIcon({
iconUrl: icona,
iconSize: [32, 37],
iconAnchor: [16, 37],
popupAnchor: [0, -30] ,
shadowUrl: "./resources/shadow.png",
shadowSize: [51, 37]
})
});
},
onEachFeature: function(feature, layer)
{
layer.bindPopup(feature.properties.Nome);
}
});
//map.addLayer(punti);
markers.addLayer(punti);
//map.addLayer(acetate);
//map.addLayer(mapquest);
map.addLayer(markers);
map.fitBounds(markers.getBounds());
map.attributionControl.setPosition('bottomleft');
map.attributionControl.addAttribution("PinPoint da <a href='http://www.comune.palermo.it/'>Comune di Palermo</a>");
</script>
<script src="http://code.jquery.com/jquery.js"></script>
<script src="./bootstrap/js/bootstrap.min.js"></script>
</body>
</html>