Bonjour,

Déjà, je m'excuse si je mettais ce message au mauvais endroit. J'ai un doute quant au bon choix.

J'utilise une superbe librairie Leaflet pour geopositionner des objets.
J'utilise aussi un template, qui utilise, aussi, cette libriaire Cool.

Donc, j'ai une solution que j'ai du lgèrement adapter, et j'aimerais faire un petit changement.

Q1: Comment depuis FieFox on peut détecter le déclanchement d'un click, afin de savoir qu'elle fonction est appelée au moment du click.

Voici ce qui est présenté actuellement https://bud.eco-sensors.ch/
Il faut cliqué sur un icone, pour voir les mesures et la photo
Nom : Screenshot 2021-02-12 at 15.27.16.png
Affichages : 146
Taille : 570,7 Ko
et j'aimerais que ceci soit toujours affiché, bien entendu, sans la photo, et en redimenssionnant le box, afin que cela prenne moin de place sur la map.

Les fichiers du template, y en a beaucoup. J'ai pu trouver que c'est cette partie qui gère la carte

Code javascript : Sélectionner tout - Visualiser dans une fenêtre à part
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
 
function createHomepageOSM(_latitude,_longitude,_nbField){
 
 
    setMapHeight();
 
    if( document.getElementById('map') != null ){
 
        var map = L.map('map', {
            center: [_latitude,_longitude],
            zoom: 18,
            scrollWheelZoom: false
        });
 
        //L.tileLayer('http://openmapsurfer.uni-hd.de/tiles/roadsg/x={x}&y={y}&z={z}', {
        L.tileLayer('http://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png', {
            //subdomains: '0123',
            maxZoom: 20,
            attribution: '<a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>'
        }).addTo(map);
 
 
        var markers = L.markerClusterGroup({
            showCoverageOnHover: false
        });
 
        function locateUser() {
            $('#map').addClass('fade-map');
            map.locate({setView : true})
        }
        $('.geo-location').on("click", function() {
            locateUser();
        });
 
 
        $.ajax({
            type: "POST",
            url: "sql/get_map.mysql.php",
            //data:'node=node1',
            //data:{node_id:"firstnode", node2:"secondnode", node3:"thirdnode", from:"from", to:"to"}, // Send parameter to get.php
            success: result,
            error: error,
            dataType: "json"
        });
 
        function error(data)
        {
            $('body').addClass('loaded');
            alert("Error getting datas from DB");
            console.log("Error getting datas from DB");
            console.log(data);
        }
 
 
        function result(data){
            console.info("data:",data);
 
            var allMarkers=[];
            var nhtml = '<img src="assets/img/property-types/vineyard.png">';
 
            for (var i = 0; i < data.properties.length; i++) {
 
                allMarkers.push(L.latLng(data.properties[i]['la'], data.properties[i]['lo']));
 
 
 
                //data.properties[i]['b2'] = 0;
 
                if((data.properties[i]['b1']>=data.properties[i]['se'] && data.properties[i]['b1'] < data.properties[i]['se']+1) ||
                    (data.properties[i]['b2']>=data.properties[i]['se'] && data.properties[i]['b2'] < data.properties[i]['se']+1) ||
                    (data.properties[i]['b3']>=data.properties[i]['se'] && data.properties[i]['b3'] < data.properties[i]['se']+1) ||
                    (data.properties[i]['b4']>=data.properties[i]['se'] && data.properties[i]['b4'] < data.properties[i]['se']+1)
                )
                {
                    nhtml = '<img src="assets/img/property-types/vineyard-orange.png">';
                }
 
 
 
                if(((data.properties[i]['b1'] < data.properties[i]['se']) && data.properties[i]['b1'] != null) ||
                    ((data.properties[i]['b2'] < data.properties[i]['se']) && data.properties[i]['b2'] != null) ||
                    ((data.properties[i]['b3'] < data.properties[i]['se']) && data.properties[i]['b3'] != null) ||
                    ((data.properties[i]['b4'] < data.properties[i]['se']) && data.properties[i]['b4'] != null)
                )
                {
 
 
                    nhtml = '<img src="assets/img/property-types/vineyard-red.png">';
                }
                else{
                    nhtml = '<img src="assets/img/property-types/vineyard.png">';
                }
 
 
 
 
                var _icon = L.divIcon({
                    //html: '<img src="' + locations[i][7] +'">',
                    html: nhtml,
                    iconSize:     [40, 48],
                    iconAnchor:   [20, 48],
                    popupAnchor:  [0, -48]
                });
 
                var title = data.properties[i]['station'];
                var marker = L.marker(new L.LatLng(data.properties[i]['la'],data.properties[i]['lo']), {
                    title: title,
                    icon: _icon
                });
 
                var str ='';
                if(data.properties[i]['b1'] != null)
                {
                    str = str.concat('<div class="tag price"> ' + data.properties[i]['b1'] + '°C</div>');
                }
                if(data.properties[i]['b2'] != null)
                {
                    str = str.concat('<div class="tag price"> ' + data.properties[i]['b2'] + '°C</div>');
                }
                if(data.properties[i]['b3'] != null)
                {
                    str = str.concat('<div class="tag price"> ' + data.properties[i]['b3'] + '°C</div>');
                }
                if(data.properties[i]['b4'] != null)
                {
 
                    str = str.concat('<div class="tag price"> ' + data.properties[i]['b4'] + '°C</div>');
                }
 
 
                marker.bindPopup(
                    '<div class="property">' +
                        '<a data-field=' + data.properties[i]['id_field'] +'" data-station=' + data.properties[i]['id_station'] +'" href="charts.php?field='+ data.properties[i]['id_field'] +'">' +
                            '<div class="property-image">' +
 
                                '<img src="img/stations/station-' + data.properties[i]['id_station'] + '.jpg">' +
                            '</div>' +
                            '<div class="overlay">' +
 
                                '<div class="info">' +
                                      '<h3>d-' + data.properties[i]['station'] + '</h3>' +
                                    '<figure>' + data.properties[i]['da'] + '</figure>' +
                                     '<figure>' + data.properties[i]['la'] + ' ' + data.properties[i]['lo'] +'</figure>' +
                                    str +
                                    /*
                                    '<div class="tag price"> ' + data.properties[i]['b1'] + '°C</div>' +
                                    
                                    '<div class="tag price"> ' + data.properties[i]['b2'] + '°C</div>' +
                                    '<div class="tag price"> ' + data.properties[i]['b3'] + '°C</div>' +
                                    '<div class="tag price"> ' + data.properties[i]['b4'] + '°C</div>' +
                                    */
                                    '<div class="tag"> ' + data.properties[i]['se'] + '°C</div>' +
 
 
                                '</div>' +
                            '</div>' +
                        '</a>' +
                    '</div>'
                );
                markers.addLayer(marker);
            }
 
 
            if(_nbField>1){
                bounds = L.latLngBounds(allMarkers);
                map.fitBounds(bounds,{ padding: [10, 10] });
            }
 
            map.addLayer(markers);
            map.on('locationfound', onLocationFound);
 
            function onLocationFound(){
                $('#map').removeClass('fade-map');
            }
 
            $('body').addClass('loaded');
 
            setTimeout(function() {
                $('body').removeClass('has-fullscreen-map');
            }, 1000);
 
            $('#map').removeClass('fade-map');
 
 
 
        }
}}

Mais je n'arrive pas à troucer, ce qui déclanche le pupup, On est d'accord que c'est le click, mais ou est la fonction qui est appelée au moment du clique, car je souhaiterai l'annulée.

Pour revenir au début de mon message, est-ce qu'avec FirFox, ou peut monitorer l'action de jacsvript/jquery

Merciii