marker images

This commit is contained in:
2026-01-10 21:09:14 +01:00
parent 325373b5d7
commit 975a8039b3
4 changed files with 24 additions and 17 deletions

View File

@@ -86,7 +86,9 @@ module.exports = {
}, */{ }, */{
from: path.resolve(LIB, 'index.php'), from: path.resolve(LIB, 'index.php'),
to: 'index.php' to: 'index.php'
}] },
{ from: 'src/images/footprint_mapbox.png', to: 'images' }
],
}), }),
new SymlinkWebpackPlugin([ new SymlinkWebpackPlugin([
{ origin: '../files/', symlink: 'files' }, { origin: '../files/', symlink: 'files' },

View File

@@ -77,7 +77,7 @@ export default {
if(sNewBaseMap) this.map.setLayoutProperty(sNewBaseMap, 'visibility', 'visible'); if(sNewBaseMap) this.map.setLayoutProperty(sNewBaseMap, 'visibility', 'visible');
}, },
projectCodename(sNewCodeName, sOldCodeName) { projectCodename(sNewCodeName, sOldCodeName) {
console.log('change in projectCodename: '+sNewCodeName); //console.log('change in projectCodename: '+sNewCodeName);
//this.toggleSettingsPanel(false); //this.toggleSettingsPanel(false);
this.$parent.setHash(this.$parent.hash.page, [sNewCodeName]); this.$parent.setHash(this.$parent.hash.page, [sNewCodeName]);
this.init(); this.init();
@@ -224,7 +224,7 @@ export default {
}); });
//Markers //Markers
let aoMarkerSource = {type:'geojson', data:{type: 'FeatureCollection', features: []}}; let aoMarkerSource = {type:'geojson', data:{type: 'FeatureCollection', features:[]}};
for(const oMsg of this.messages) { for(const oMsg of this.messages) {
aoMarkerSource.data.features.push({ aoMarkerSource.data.features.push({
'type': 'Feature', 'type': 'Feature',
@@ -271,7 +271,7 @@ export default {
*/ */
} }
this.map.addSource('markers', aoMarkerSource); this.map.addSource('markers', aoMarkerSource);
const image = await this.map.loadImage('https://maplibre.org/maplibre-gl-js/docs/assets/custom_marker.png'); const image = await this.map.loadImage('images/footprint_mapbox.png');
this.map.addImage('markerIcon', image.data); this.map.addImage('markerIcon', image.data);
this.map.addLayer({ this.map.addLayer({
'id': 'markers', 'id': 'markers',
@@ -293,15 +293,15 @@ export default {
.setLngLat(e.lngLat) .setLngLat(e.lngLat)
.addTo(this.map); .addTo(this.map);
let rProp = ref(e.features[0].properties); let rProp = ref(e.features[0].properties);console.log(rProp);
const vPopup = defineComponent({ const vPopup = defineComponent({
extends: ProjectPopup, extends: ProjectPopup,
setup: () => { setup: () => {
console.log(rProp.value); //console.log(rProp.value.medias);
provide('options', rProp.value); provide('options', rProp.value);
provide('spot', this.spot); provide('spot', this.spot);
provide('project', this.project); provide('project', this.project);
return {'options': rProp.value, 'spot':this.spot, 'project':this.project}; return {'options': rProp.value, 'medias': JSON.parse(rProp.value.medias || '""'), 'spot':this.spot, 'project':this.project};
} }
}); });
nextTick(() => { nextTick(() => {

View File

@@ -43,7 +43,7 @@ export default {
class="clickable" class="clickable"
/> />
<span class="drill-icon"><spotIcon :icon="'drill-'+options.subtype" /></span> <span class="drill-icon"><spotIcon :icon="'drill-'+options.subtype" /></span>
<span v-if="options.comment" class="comment">{{ options.comment }}</span> <span v-if="options.comment && type == 'post'" class="comment">{{ options.comment }}</span>
</a> </a>
<div style="display:none"> <div style="display:none">
<span ref="comment" class="lb-caption-line comment desktop" :title="options.comment"> <span ref="comment" class="lb-caption-line comment desktop" :title="options.comment">

View File

@@ -3,11 +3,13 @@ import { options } from 'lightbox2';
import projectMapLink from './projectMapLink.vue'; import projectMapLink from './projectMapLink.vue';
import spotIcon from './spotIcon.vue'; import spotIcon from './spotIcon.vue';
import projectRelTime from './projectRelTime.vue'; import projectRelTime from './projectRelTime.vue';
import projectMediaLink from './projectMediaLink.vue';
export default { export default {
components: { components: {
spotIcon, spotIcon,
projectMapLink, projectMapLink,
projectMediaLink,
projectRelTime projectRelTime
}, },
//props: { //props: {
@@ -17,7 +19,7 @@ export default {
return { return {
} }
}, },
//inject: ['options', 'spot', 'project'], //inject: ['options', 'medias', 'spot', 'project'],
mounted() { mounted() {
} }
@@ -46,5 +48,8 @@ export default {
<p class="weather" v-if="options.weather_icon && options.weather_icon!='unknown'" :title="options.weather_cond==''?'':spot.lang(options.weather_cond)"> <p class="weather" v-if="options.weather_icon && options.weather_icon!='unknown'" :title="options.weather_cond==''?'':spot.lang(options.weather_cond)">
<spotIcon :icon="options.weather_icon" :classes="'fa-fw fa-lg'" :text="options.weather_temp+'°C'" /> <spotIcon :icon="options.weather_icon" :classes="'fa-fw fa-lg'" :text="options.weather_temp+'°C'" />
</p> </p>
<p class="medias">
<projectMediaLink v-for="media in medias" :options="media" :type="'marker'" />
</p>
</div> </div>
</template> </template>