-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
89 lines (73 loc) · 2.53 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
<!DOCTYPE html>
<html lang="fr" dir="ltr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>Pêche Vaucluse</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/leaflet.locatecontrol/dist/L.Control.Locate.min.css" />
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" integrity="sha256-kLaT2GOSpHechhsozzB+flnD+zUyjE2LlfWPgU04xyI=" crossorigin="" />
<script src="https://unpkg.com/[email protected]/dist/leaflet.js" integrity="sha256-WBkoXOwTeyKclOHuWtc+i2uENFpDZ9YPdf5Hf+D7ewM=" crossorigin=""></script>
<script src="js/leaflet-providers.js"></script>
<style>
html, body {
margin: 0px;
width: 100%;
height: 100%;
}
#map {
width: 100%;
height: 100%;
}
.leaflet-popup-content {
width: auto !important;
}
</style>
</head>
<body>
<div id="map">
</div>
<script src="https://cdn.jsdelivr.net/npm/leaflet.locatecontrol/dist/L.Control.Locate.min.js" charset="utf-8"></script>
<script src="data/fishing_restriction.js"></script>
<script src="data/categorie_piscicole.js"></script>
<script src="data/cours_eau.js"></script>
<script src="data/plandeau.js"></script>
<script src="js/style.js"></script>
<script src="js/popup.js"></script>
<script src="js/variable.js"></script>
<script>
//map de base
var testcanvas = L.canvas({tolerance: 5});
var map
map = L.map("map",{
zoomControl:true,
maxZoom:28,
minZoom:1,
renderer: testcanvas}
).setView([43.942259, 4.797535], 12);
map.addLayer(OpenStreetMap_France);
//geolocalisation
var ld
ld = L.control.locate({
flyTo: 'yes',
returnToPrevBounds:'true'
}).addTo(map);
//add geojson cours d'eau (all data)
L.geoJSON(json_plandeau, {
style: {weight:'2'},
onEachFeature: popupplan_eau }
).addTo(map);
L.geoJSON(json_cours_eau, {
style: style_intermittent,
onEachFeature: popupcourseau}
).addTo(map);
var overlays = {
'réserve de pêche': reserveoverlay,
'catégorie piscicole' : categoriepiscicoleoverlay
};
//controle fond de carte et layers
var layerControl
layerControl = L.control.layers(baselayers, overlays,{position:'topleft'});
layerControl.addTo(map);
</script>
</body>
</html>