/
index.html
379 lines (349 loc) · 17.5 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
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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0">
<meta name=description content="Carte Collectif Vélo Île-de-France">
<meta name="twitter:image:src" content="https://carte.velo-iledefrance.fr/images/social_media.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Carte Collectif Vélo Île-de-France">
<meta name="twitter:description" content="Carte des pistes cyclables temporaires en Île-de-France">
<meta property="og:site_name" content="Carte Collectif Vélo Île-de-France">
<meta property="og:image" content="https://carte.velo-iledefrance.fr/images/social_media.png">
<meta property="og:type" content="website">
<meta property="og:title" content="Carte Collectif Vélo Île-de-France">
<meta property="og:url" content="https://velo-iledefrance.fr/">
<meta property="og:description" content="Carte des pistes cyclables temporaires en Île-de-France">
<!--link rel="icon" type="image/png" sizes="16x16" href="https://carte.velo-iledefrance.fr/images/favicon-16.png"-->
<link rel="icon" type="image/png" sizes="192x192" href="https://carte.velo-iledefrance.fr/images/cropped-favicon_cvidf_rvb-192x192.png">
<link rel="icon" type="image/png" sizes="228x228" href="https://carte.velo-iledefrance.fr/images/cropped-favicon_cvidf_rvb-228x228.png">
<link rel="icon" type="image/png" sizes="32x32" href="https://carte.velo-iledefrance.fr/images/cropped-favicon_cvidf_rvb-32x32.png">
<!--link rel="shortcut icon" href="https://carte.velo-iledefrance.fr/images/favicon.ico"-->
<title>Carte Collectif Vélo Île-de-France</title>
<link rel="stylesheet" href="css/leaflet.css">
<link rel="stylesheet" href="css/Control.Geocoder.css">
<link rel="stylesheet" href="css/easy-button.css">
<link rel="stylesheet" href="css/L.Control.Locate.min.css">
<link rel="stylesheet" href="css/fa-all.min.css">
<link rel="stylesheet" href="css/leaflet-legend.css">
<style type="text/css">
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
src: url('/webfonts/roboto-v20-latin-regular.eot'); /* IE9 Compat Modes */
src: local('Roboto'), local('Roboto-Regular'),
url('/webfonts/roboto-v20-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('/webfonts/roboto-v20-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */
url('/webfonts/roboto-v20-latin-regular.woff') format('woff'), /* Modern Browsers */
url('/webfonts/roboto-v20-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */
url('/webfonts/roboto-v20-latin-regular.svg#Roboto') format('svg'); /* Legacy iOS */
}
html {
min-height: 100%;
position: relative;
font-family: Roboto, sans-serif;
}
body {
margin: 0;
width: 100%;
height: 100%;
text-align: justify;
font-size: 14px;
overflow: hidden;
}
div#map {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
right: 0;
}
#mainTitle {
margin-top: 0;
}
.leaflet-bottom.leaflet-left {
background-color: white;
padding: 5px;
border-right: 2px solid rgba(0,0,0,0.2);
border-top: 2px solid rgba(0,0,0,0.2);
}
.leaflet-control-watermark.leaflet-control {
margin-bottom: 0px;
margin-left: 5px;
}
.leaflet-legend {
padding: 7px;
}
.leaflet-legend-color2left {
display: inline-block;
width: 10px;
heigth: 20px;
margin-right: 0px;
}
.leaflet-legend-color2right {
display: inline-block;
width: 10px;
heigth: 20px;
margin-left: 0px;
margin-right: 4px;
}
.leaflet-layer-cyclosm-lite img {
filter: hue-rotate(-58deg) brightness(240%) saturate(50%);
-webkit-filter: hue-rotate(-58deg) brightness(240%) saturate(50%);
}
@media screen and (max-width: 550px) {
.leaflet-control-watermark.leaflet-control {
margin-bottom: 20px;
}
}
</style>
</head>
<body>
<div id="map"></div>
<script src="js/leaflet.js"></script>
<script src="js/leaflet.ajax.min.js"></script>
<script src="js/leaflet-fullHash.js"></script>
<script src="js/Control.Geocoder.js"></script>
<script src="js/easy-button.js"></script>
<script src="js/L.Control.Locate.js"></script>
<script src="js/leaflet.restoreview.js"></script>
<script src="js/tingle.min.js"></script>
<script src="js/leaflet-legend.js"></script>
<script type="text/javascript">
document.addEventListener('DOMContentLoaded', function () {
// ==========
// Handle map
// ==========
// Available tiles definition
var pianoFR = L.tileLayer('https://{s}.piano.tiles.quaidorsay.fr/fr/{z}/{x}/{y}.png', {
attribution: 'Tiles <a href="https://github.com/tilery/pianoforte">PianoFr</a> | © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors',
minZoom: 0,
maxZoom: 20,
});
var forteFR = L.tileLayer('https://{s}.forte.tiles.quaidorsay.fr/fr/{z}/{x}/{y}.png', {
attribution: 'Tiles <a href="https://github.com/tilery/pianoforte">ForteFr</a> | © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors',
minZoom: 0,
maxZoom: 20,
});
/*var street = L.tileLayer('https://tile.jawg.io/{z}/{x}/{y}.png?api-key=community', {
attribution: 'Tiles from <a href="https://www.jawg.io">Jawg.io</a> | © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors',
minZoom: 0,
maxZoom: 20,
});
var sunny = L.tileLayer('https://tile.jawg.io/sunny/{z}/{x}/{y}.png?api-key=community', {
attribution: 'Tiles from <a href="https://www.jawg.io">Jawg.io</a> | © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors',
minZoom: 0,
maxZoom: 20,
});
var light = L.tileLayer('https://tile.jawg.io/light/{z}/{x}/{y}.png?api-key=community', {
attribution: 'Tiles from <a href="https://www.jawg.io">Jawg.io</a> | © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors',
minZoom: 0,
maxZoom: 20,
});*/
var cyclosm = L.tileLayer('https://{s}.tile-cyclosm.openstreetmap.fr/cyclosm/{z}/{x}/{y}.png', {
attribution: 'Hosting by <a href="https://openstreetmap.fr">OSM-FR</a>',
minZoom: 0,
maxZoom: 20,
});
var cyclosmLite = L.tileLayer('https://{s}.tile-cyclosm.openstreetmap.fr/cyclosm-lite/{z}/{x}/{y}.png', {
attribution: '<a href="https://www.cyclosm.org">CyclOSM</a> layer hosted by <a href="https://openstreetmap.fr">OSM-Fr</a>',
minZoom: 12,
maxZoom: 20,
});
var cyclosmFull = L.tileLayer('https://{s}.tile-cyclosm.openstreetmap.fr/cyclosm/{z}/{x}/{y}.png', {
attribution: '<a href="https://www.cyclosm.org">CyclOSM</a> hosted by <a href="https://openstreetmap.fr">OSM-Fr</a> | © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors',
minZoom: 0,
maxZoom: 20,
});
var osm = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '© <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors',
minZoom: 0,
maxZoom: 19,
});
/*var kosmtik = L.tileLayer('http://127.0.0.1:6789/cyclosm-cartocss-style/tile/{z}/{x}/{y}.png', {
attribution: '© <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors',
minZoom: 0,
maxZoom: 19,
});*/
var projetLayer = new L.GeoJSON.AJAX(
//"https://raw.githubusercontent.com/velo-iledefrance/pistes-deconfinement/gh-pages/carte_de_travail_pistes_temporaires.geojson",
"carte_de_travail_pistes_temporaires.geojson",
{
style: {
"color": "#555555",
"weight": 3,
"opacity": 1,
}
});
var existantLayer = new L.GeoJSON.AJAX(
//"https://raw.githubusercontent.com/velo-iledefrance/pistes-deconfinement/gh-pages/existant.geojson",
"existant.geojson",
{
style: {
"color": "#E75221",
"weight": 3,
"opacity": 1,
}
});
/*var existantLayerCasing = new L.GeoJSON.AJAX(
"existant.geojson",
{
style: {
"color": "#000000",
"weight": 4,
"opacity": 1,
}
});*/
var provisoireLayer = new L.GeoJSON.AJAX(
"pistes_provisoires.geojson",
{
style: {
"color": "#F49F17",
"weight": 3,
"opacity": 1,
}
});
// Lanes made permanent or transformed into bus-bike lanes will be displayed as temporary lanes
var perenniseeLayer = new L.GeoJSON.AJAX(
"pistes_perennisees.geojson",
{
style: {
"color": "#F49F17",
"weight": 3,
"opacity": 1,
}
});
var voiesBusLayer = new L.GeoJSON.AJAX(
"pistes_transformees_voies_bus.geojson",
{
style: {
"color": "#F49F17",
"weight": 3,
"opacity": 1,
}
});
var queryDict = {}
location.search.substr(1).split("&").forEach(function(item) {queryDict[item.split("=")[0]] = item.split("=")[1]})
var map = new L.Map('map', {
zoomControl: true,
layers: [pianoFR, cyclosmLite, existantLayer, projetLayer, provisoireLayer, perenniseeLayer, voiesBusLayer],
scrollWheelZoom: queryDict['noZoom'] ? false : true
}).on('layeradd', function(event){
if (event.layer._url && event.layer._url.match(/cyclosm-lite/)) {
event.layer.getContainer().className += ' leaflet-layer-cyclosm-lite';
}
});
map.attributionControl.setPrefix('Par le <a href="https://velo-iledefrance.fr" title="Collectif Vélo Île-de-France">Collectif Vélo Île-de-France</a> | <a href="http://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>');
if (!map.restoreView()) {
// Default view on Paris
map.setView([48.8589, 2.3469], 11);
}
// Add logos
L.Control.Watermark = L.Control.extend({
onAdd: function(map) {
var div = L.DomUtil.create('div');
div.className = 'leaflet-control-watermark';
var a1 = L.DomUtil.create('a');
a1.href= "https://velo-iledefrance.fr"
var img1 = L.DomUtil.create('img')
img1.src = "images/logo_cvidf_rvb_64x64.png"
a1.appendChild(img1);
var a2 = L.DomUtil.create('a');
a2.href= "https://www.metropolegrandparis.fr"
var img2 = L.DomUtil.create('img')
img2.src = "images/2MGP-HD_64h.png"
a2.appendChild(img2);
div.appendChild(a1);
div.appendChild(a2);
return div;
},
onRemove: function(map) {
// Nothing to do here
}
});
L.control.watermark = function(opts) {
return new L.Control.Watermark(opts);
}
L.control.watermark({ position: 'bottomleft' }).addTo(map);
// Legend
L.control.legend({
items: [
{ color: '#E75221', label: 'Itinéraires cyclables existants' },
{ color: '#F49F17', label: 'Pistes cyclables temporaires' },
{ color: '#555555', label: 'Pistes temporaires en projet' },
{ color: '#387ab1', color2: '#65e5e4', label: 'Autres aménagements cyclables' },
//{ color: '#65e5e4', label: 'Chemin cyclable partagé' }
],
collapsed: false,
buttonHtml: 'Légende'
}).addTo(map);
// Set up layers control
var baseMaps = {
"OSM Piano": pianoFR,
"OSM Forte": forteFR,
//"OSM Street": street,
//"OSM Sunny": sunny,
//"OSM Light": light,
"CyclOSM": cyclosm,
"OSM": osm
};
var overlayMaps = {
"Pistes cyclables": cyclosmLite,
"Principaux axes cyclables": existantLayer,
//"ExistantCasing": existantLayerCasing,
"Pistes cyclables temporaires en projet": projetLayer,
"Pistes cyclables temporaires": provisoireLayer,
"Pistes cyclables pérennisées": perenniseeLayer,
"Pistes temporaires transformées en voies ou couloirs bus": voiesBusLayer,
//"kosmtik": kosmtik
};
L.control.layers(baseMaps, overlayMaps, { collapsed: true }).addTo(map);
// Set up hash plugin
var allMapLayers = {};
Object.keys(baseMaps).forEach(function (key) {
allMapLayers[key.replace(/ /g, '_')] = baseMaps[key];
});
Object.keys(overlayMaps).forEach(function (key) {
allMapLayers[key.replace(/ /g, '_')] = overlayMaps[key];
});
L.hash(map, allMapLayers);
// Set up geocoder plugin
var geocoder = L.Control.geocoder({
defaultMarkGeocode: false,
position: 'topleft'
});
geocoder.on('markgeocode', function(e) {
map.fitBounds(e.geocode.bbox);
})
geocoder.addTo(map);
document.querySelector('button.leaflet-control-geocoder-icon').title = 'Search'
// Set up geolocation plugin
L.control.locate().addTo(map);
// Add a scale
L.control.scale().addTo(map);
// Set up edit
/* L.easyButton('fa-edit', function(btn, map) {
window.open('https://www.openstreetmap.org/edit' + window.location.hash, '_blank');
}, 'Edit the map').addTo(map);*/
});
</script>
<!-- Fathom - simple website analytics - https://github.com/usefathom/fathom -->
<script>
(function(f, a, t, h, o, m){
a[h]=a[h]||function(){
(a[h].q=a[h].q||[]).push(arguments)
};
o=f.createElement('script'),
m=f.getElementsByTagName('script')[0];
o.async=1; o.src=t; o.id='fathom-script';
m.parentNode.insertBefore(o,m)
})(document, window, '//stats.cyclosm.org/tracker.js', 'fathom');
fathom('set', 'siteId', 'KJNHH');
fathom('trackPageview');
</script>
<!-- / Fathom -->
</body>
</html>