Replace leaflet with maplibre GL
This commit is contained in:
@@ -38,4 +38,4 @@ import SpotVue from '../Spot.vue';
|
||||
|
||||
const oSpotVue = createApp(SpotVue);
|
||||
oSpotVue.provide('spot', window.oSpot);
|
||||
oSpotVue.mount('#main');
|
||||
oSpotVue.mount('#container');
|
||||
@@ -1101,7 +1101,11 @@ export default class Project {
|
||||
.addIcon('fa-'+asData.subtype+'-shot fa-lg fa-fw', true)
|
||||
.append(asData.taken_on_formatted);
|
||||
|
||||
var $Title = $('<div>').append($Comment).append(sType=='marker'?$TakenOn:$PostedOn).append(sType=='marker'?$PostedOn:$TakenOn);
|
||||
var $Title = $('<div>')
|
||||
.append($Comment)
|
||||
.append(sType=='marker'?$TakenOn:$PostedOn)
|
||||
.append(sType=='marker'?$PostedOn:$TakenOn);
|
||||
|
||||
var $Link =
|
||||
$('<a>', {
|
||||
'class': 'media-link drill',
|
||||
|
||||
@@ -83,11 +83,12 @@ export default class Spot {
|
||||
});
|
||||
}
|
||||
|
||||
async get2(sAction, oVars) {
|
||||
async get2(sAction, oVars, bLoading) {
|
||||
oVars = oVars || {};
|
||||
oVars['a'] = sAction;
|
||||
oVars['t'] = this.consts.timezone;
|
||||
|
||||
bLoading = true;
|
||||
|
||||
let oUrl = new URL(this.consts.server+this.consts.process_page);
|
||||
oUrl.search = new URLSearchParams(oVars).toString();
|
||||
|
||||
@@ -95,9 +96,13 @@ export default class Spot {
|
||||
let oUrl = new URL(this.consts.server+this.consts.process_page);
|
||||
oUrl.search = new URLSearchParams(oVars).toString();
|
||||
const oRequest = await fetch(oUrl, {method: 'GET', /*body: JSON.stringify(oVars),*/ headers: {"Content-Type": "application/json"}});
|
||||
if(!oRequest.ok) throw new Error('Error HTTP '+oRequest.status+': '+oRequest.statusText);
|
||||
if(!oRequest.ok) {
|
||||
bLoading = false;
|
||||
throw new Error('Error HTTP '+oRequest.status+': '+oRequest.statusText);
|
||||
}
|
||||
else {
|
||||
let oResponse = await oRequest.json();
|
||||
bLoading = false;
|
||||
if(oResponse.desc.substr(0, this.consts.lang_prefix.length)==this.consts.lang_prefix) oResponse.desc = this.lang(oData.desc.substr(this.consts.lang_prefix.length));
|
||||
|
||||
if(oResponse.result == this.consts.error) return Promise.reject(oResponse.desc);
|
||||
@@ -105,6 +110,7 @@ export default class Spot {
|
||||
}
|
||||
}
|
||||
catch(oError) {
|
||||
bLoading = false;
|
||||
throw oError;
|
||||
}
|
||||
}
|
||||
@@ -126,6 +132,10 @@ export default class Spot {
|
||||
return sLang;
|
||||
}
|
||||
|
||||
isMobile() {
|
||||
return $('#mobile').is(':visible');
|
||||
}
|
||||
|
||||
/* Page Switch - Trigger & Event catching */
|
||||
|
||||
onHashChange() {
|
||||
|
||||
Reference in New Issue
Block a user