Use labels everywhere + ordering for underwater...
This commit is contained in:
@@ -166,7 +166,7 @@ GIS.sites = async function () {
|
||||
record.coordinates,
|
||||
{icon: Icons.site, label: record.label}
|
||||
)
|
||||
.bindTooltip(record.label + '<br>(Clicca per aprire scheda)')
|
||||
.bindTooltip(record.label)
|
||||
.on(
|
||||
'click',
|
||||
() => UI.openSiteModal(record, '#site-data')
|
||||
@@ -199,7 +199,7 @@ GIS.notConserved = async function () {
|
||||
record.coordinates,
|
||||
{icon: Icons.notConserved, label: record.label}
|
||||
)
|
||||
.bindTooltip(record.denomination)
|
||||
.bindTooltip(record.label)
|
||||
.on('click', () => UI.openNotConserModal(record, '#not-conser-data'));
|
||||
|
||||
notConserved.addLayer(marker);
|
||||
@@ -229,7 +229,7 @@ GIS.findings = async function () {
|
||||
const marker = L.marker(
|
||||
record.coordinates,
|
||||
{icon: Icons.finding, label: record.label}
|
||||
).bindTooltip(record.object)
|
||||
).bindTooltip(record.label)
|
||||
.on(
|
||||
'click',
|
||||
() => UI.openFindingModal(record, '#finding-data')
|
||||
@@ -261,7 +261,7 @@ GIS.prehistoric = async function () {
|
||||
const marker = L.marker(
|
||||
record.coordinates,
|
||||
{icon: Icons.prehistoric, label: record.label}
|
||||
).bindTooltip(record.denomination)
|
||||
).bindTooltip(record.label)
|
||||
.on(
|
||||
'click',
|
||||
() => UI.openPrehistModal(record, '#prehist-data')
|
||||
@@ -292,7 +292,7 @@ GIS.underwater = async function () {
|
||||
const marker = L.marker(
|
||||
record.coordinates,
|
||||
{icon: Icons.underwater}
|
||||
).bindTooltip(record.denomination)
|
||||
).bindTooltip(record.label)
|
||||
.on(
|
||||
'click',
|
||||
() => UI.openUnderwaterModal(record, '#underwater-data')
|
||||
@@ -517,10 +517,10 @@ GIS.featurePopup = function (layerName, feature) {
|
||||
}
|
||||
/**
|
||||
* Fetch data from API
|
||||
* @param {string} recordId
|
||||
* @param {string} recordUri The URI to be appendend to the API's base URL
|
||||
*/
|
||||
GIS._fetchData = async function (recordId) {
|
||||
const data = await fetch(`${API_URL}/${recordId}`)
|
||||
GIS._fetchData = async function (recordUri) {
|
||||
const data = await fetch(`${API_URL}/${recordUri}`)
|
||||
.then(res => res.json())
|
||||
.catch(err => console.log('Error fetching data from DB: ' + err));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user