retourner infos dans la console
davvalent

davvalent commited on 2023-04-03 03:41:26
Showing 1 changed files, with 5 additions and 2 deletions.

... ...
@@ -243,6 +243,7 @@ console.log(
243 243
             img.onload = () => resolve(img);
244 244
             img.onerror = reject;
245 245
             img.src = src;
246
+            console.log("Image en cache : ", img.complete);
246 247
           });
247 248
         }
248 249
 
... ...
@@ -252,9 +253,11 @@ console.log(
252 253
         /** printing information */
253 254
         console.log("Nombre d'images téléchargées : ", imagesElements.length);
254 255
         const imagesList = imagesElements.map((element) => {
255
-          return element.currentSrc;
256
+          return {
257
+            src: element.currentSrc
258
+          };
256 259
         })
257
-        console.log("URLs of images", imagesList);
260
+        console.log("URL : ", imagesList);
258 261
 
259 262
         /** update the DOM with images for the Leaflet popup */
260 263
         imagesElements.forEach((image, index) => {
261 264