-
Notifications
You must be signed in to change notification settings - Fork 0
/
util_controls.js
38 lines (31 loc) · 1.31 KB
/
util_controls.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
L.Control.Results = L.Control.extend({
onAdd: function(map) {
let container = L.DomUtil.create('div', 'leaflet-bar control results ');
container.title = "הצגת התוצאות";
container.style.cursor = "pointer"
L.DomEvent.disableClickPropagation(container);
L.DomEvent.disableScrollPropagation(container);
container.innerHTML = `<i class="fg-2x fg-map-stat"></i>`
container.onclick = showResults
return container;
}
})
L.control.results = function(opts) {
return new L.Control.Results(opts);
}
L.Control.Legend = L.Control.extend({
onAdd: function(map) {
let container = L.DomUtil.create('div', 'leaflet-bar control info legend');
container.title = "מקרא";
L.DomEvent.disableClickPropagation(container);
L.DomEvent.disableScrollPropagation(container);
container.innerHTML += '<i style="background: #1b9e77"></i> גוש דן <br>'
container.innerHTML += '<i style="background: #7570b3"></i> לא גוש דן <br>'
container.innerHTML += '<i style="background: #d95f02"></i> טרם הוכרע <br>'
return container;
}
})
L.control.legend = function(opts) {
return new L.Control.Legend(opts);
}
let legendControl = L.control.legend({ position: 'topright' })