Update report style (map and gallery)

This commit is contained in:
2023-03-02 17:01:53 +01:00
parent 167545ffbf
commit 37f51955e6
4 changed files with 13 additions and 9 deletions

View File

@@ -1,4 +1,8 @@
'use strict';
/**
* @namespace DataSpace
*/
const DataSpace = {};
export const BASE_URL = 'http://dataspace.ispc.cnr.it';
const RES_ENDPOINT = '/resources/';
@@ -87,17 +91,13 @@ export function printReport() {
});
}
export function attachMap(coordinates, htmlId = 'map') {
const map = L.map(htmlId).setView(coordinates, 13);
const map = L.map(htmlId).setView(coordinates, 18);
L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);
L.marker(coordinates).addTo(map);
/*
.bindPopup('A pretty CSS3 popup.<br> Easily customizable.')
.openPopup();
*/
}
/**
* @todo Use TS to define object shape

View File

@@ -88,7 +88,8 @@ document.addEventListener('readystatechange', async () => {
// Create image gallery
// TODO refactor...
let gallery = document.querySelector('#gallery');
gallery.classList.remove('d-hide');
gallery.parentElement
.classList.remove('d-hide');
for (const src of files) {
const img = document.createElement('img');