-
Notifications
You must be signed in to change notification settings - Fork 1
/
gestionMap_2.js
62 lines (39 loc) · 1.24 KB
/
gestionMap_2.js
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
let mymap1 = "", layerGroup1 = [];
setTimeout(() => {
mymap1 = L.map('mapid-1').fitBounds([[51.072228, 2.528016], [42.442288, 3.159714]]);
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 19,
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}).addTo(mymap1);
function setBounds() {
mymap1.flyToBounds(list_lat_lng);
};
function addMarkers() {
layerGroup1 = L.layerGroup(list_markers);
layerGroup1.addTo(mymap1);
};
if (list_markers.length > 0) {
addMarkers();
setBounds();
init_vlSpec_legend_map_1();
init_vlSpec_tick_prix_m2();
}
//augmenter zoom d'un point
/* zoomActuel = mymap1.getZoom()
mymap1.setZoom(zoomActuel-1) */
},4000 )
function init_map() {
mymap1.fitBounds([[51.072228, 2.528016], [42.442288, 3.159714]]);
function setBounds() {
mymap1.flyToBounds(list_lat_lng);
};
function addMarkers() {
layerGroup1 = L.layerGroup(list_markers);
layerGroup1.addTo(mymap1);
};
if (list_markers.length > 0) {
addMarkers();
setBounds();
}
}
import * as adapt_tailleCercles_zoom from 'adapt_tailleCercles_zoom.js';