Replace leaflet with maplibre GL

This commit is contained in:
2024-01-11 21:01:21 +01:00
parent 7853c6e285
commit c2956ac373
16 changed files with 1333 additions and 526 deletions

View File

@@ -0,0 +1,60 @@
<script>
import spotIcon from './spotIcon.vue';
export default {
components: {
spotIcon
},
props: {
options: Object,
type: String
},
data() {
return {
title:''
}
},
inject: ['spot'],
mounted() {
this.title = '<div>'+
(this.$refs.comment?this.$refs.comment.innerHTML:'')+
this.$refs[this.type=='marker'?'takenon':'postedon'].innerHTML+
this.$refs[this.type=='marker'?'postedon':'takenon'].innerHTML+
'</div>';
}
}
</script>
<template>
<a
class="media-link drill"
:href="options.media_path"
:data-lightbox="type+'-medias'"
:data-type="options.subtype"
:data-id="options.id_media"
:data-title="title"
:data-orientation="options.rotate"
>
<img
:src="options.thumb_path"
:width="options.width"
:height="options.height"
:title="spot.lang((options.subtype == 'video')?'click_watch':'click_zoom')"
class="clickable"
/>
<span class="drill-icon"><spotIcon :icon="'drill-'+options.subtype" /></span>
<span v-if="options.comment" class="comment">{{ options.comment }}</span>
</a>
<div style="display:none">
<span ref="comment" class="lb-caption-line comment desktop" :title="options.comment">
<spotIcon :icon="'post'" :classes="'fa-lg fa-fw'" />
<span class="comment-text">{{ options.comment }}</span>
</span>
<span ref="postedon" class="lb-caption-line" :title="$parent.timeDiff?spot.lang('local_time', options.posted_on_formatted_local):''">
<spotIcon :icon="'upload'" :classes="'fa-lg fa-fw'" :text="options.posted_on_formatted" />
</span>
<span ref="takenon" class="lb-caption-line" :title="$parent.timeDiff?spot.lang('local_time', options.taken_on_formatted_local):''">
<spotIcon :icon="options.subtype+'-shot'" :classes="'fa-lg fa-fw'" :text="options.taken_on_formatted" />
</span>
</div>
</template>