Update report style (map and gallery)
This commit is contained in:
10
js/ds.js
10
js/ds.js
@@ -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: '© <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
|
||||
|
||||
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user