More UI stuff...
This commit is contained in:
parent
452e28ac0e
commit
b77f010e5e
@ -173,12 +173,12 @@ GIS.loadLayer = async function (geoJSON, options, popup = true) {
|
|||||||
*/
|
*/
|
||||||
GIS.featurePopup = function (layerName, feature) {
|
GIS.featurePopup = function (layerName, feature) {
|
||||||
const html = `
|
const html = `
|
||||||
<table class="table m-2">
|
<table class="table is-striped is-size-6 m-2">
|
||||||
<tr><td class="text-bold">Oggetto</td><td>${feature.properties.OGGETTO}</td></tr>
|
<tr><th>Oggetto</th><td>${feature.properties.OGGETTO}</td></tr>
|
||||||
<tr><td class="text-bold">Anno</td><td>${feature.properties.ANNO}</td></tr>
|
<tr><th>Anno</th><td>${feature.properties.ANNO}</td></tr>
|
||||||
<tr><td class="text-bold">Comune</td><td>${capitalize(feature.properties.COMUNE)}</td></tr>
|
<tr><th>Comune</th><td>${capitalize(feature.properties.COMUNE)}</td></tr>
|
||||||
<tr><td class="text-bold">Località</td><td>${capitalize(feature.properties.LOCALITA)}</td></tr>
|
<tr><th>Località</th><td>${capitalize(feature.properties.LOCALITA)}</td></tr>
|
||||||
<tr><td class="text-bold">Proprietà</td><td>${capitalize(feature.properties.PROPRIETA)}</td></tr>
|
<tr><th>Proprietà</th><td>${capitalize(feature.properties.PROPRIETA)}</td></tr>
|
||||||
</table>
|
</table>
|
||||||
`;
|
`;
|
||||||
const content = {
|
const content = {
|
||||||
|
26
js/ui.js
26
js/ui.js
@ -5,26 +5,6 @@
|
|||||||
*/
|
*/
|
||||||
const UI = {};
|
const UI = {};
|
||||||
|
|
||||||
const centerIcon = `<svg
|
|
||||||
width="24"
|
|
||||||
height="24"
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
fill="none"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
style="margin-top: 3px"
|
|
||||||
>
|
|
||||||
<path
|
|
||||||
d="M12 15C13.6569 15 15 13.6569 15 12C15 10.3431 13.6569 9 12 9C10.3431 9 9 10.3431 9 12C9 13.6569 10.3431 15 12 15Z"
|
|
||||||
fill="currentColor"
|
|
||||||
/>
|
|
||||||
<path
|
|
||||||
fill-rule="evenodd"
|
|
||||||
clip-rule="evenodd"
|
|
||||||
d="M12 3C12.5523 3 13 3.44772 13 4V5.07089C16.0657 5.5094 18.4906 7.93431 18.9291 11H20C20.5523 11 21 11.4477 21 12C21 12.5523 20.5523 13 20 13H18.9291C18.4906 16.0657 16.0657 18.4906 13 18.9291V20C13 20.5523 12.5523 21 12 21C11.4477 21 11 20.5523 11 20V18.9291C7.93431 18.4906 5.5094 16.0657 5.07089 13H4C3.44772 13 3 12.5523 3 12C3 11.4477 3.44772 11 4 11H5.07089C5.5094 7.93431 7.93431 5.5094 11 5.07089V4C11 3.44772 11.4477 3 12 3ZM7 12C7 9.23858 9.23858 7 12 7C14.7614 7 17 9.23858 17 12C17 14.7614 14.7614 17 12 17C9.23858 17 7 14.7614 7 12Z"
|
|
||||||
fill="currentColor"
|
|
||||||
/>
|
|
||||||
</svg>`;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a control to center the map
|
* Add a control to center the map
|
||||||
* @param {Map} map
|
* @param {Map} map
|
||||||
@ -48,7 +28,11 @@ UI.addCenterMapControl = function (map, centerCoords, zoom) {
|
|||||||
let controlUI = L.DomUtil.create('a', 'leaflet-draw-edit-remove', controlDiv);
|
let controlUI = L.DomUtil.create('a', 'leaflet-draw-edit-remove', controlDiv);
|
||||||
controlUI.title = 'Centra la mappa';
|
controlUI.title = 'Centra la mappa';
|
||||||
controlUI.href = '#';
|
controlUI.href = '#';
|
||||||
controlUI.innerHTML = centerIcon;
|
controlUI.innerHTML = `
|
||||||
|
<span class="icon is-medium">
|
||||||
|
<i class="fas fa-lg fa-crosshairs"></i>
|
||||||
|
</span>
|
||||||
|
`;
|
||||||
return controlDiv;
|
return controlDiv;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user