From 975a8039b3209321090d47a0fbd798bd09c95c65 Mon Sep 17 00:00:00 2001 From: Franzz Date: Sat, 10 Jan 2026 21:09:14 +0100 Subject: [PATCH] marker images --- build/webpack.common.js | 20 +++++++++++--------- src/components/project.vue | 12 ++++++------ src/components/projectMediaLink.vue | 2 +- src/components/projectPopup.vue | 7 ++++++- 4 files changed, 24 insertions(+), 17 deletions(-) diff --git a/build/webpack.common.js b/build/webpack.common.js index 32e0bd7..f1bf426 100644 --- a/build/webpack.common.js +++ b/build/webpack.common.js @@ -78,15 +78,17 @@ module.exports = { }), new CopyWebpackPlugin({ patterns: [/*{ - from: 'geo/', - to: path.resolve(DIST, 'geo') - }, { - from: path.resolve(SRC, 'images/icons'), - to: 'images/icons' - }, */{ - from: path.resolve(LIB, 'index.php'), - to: 'index.php' - }] + from: 'geo/', + to: path.resolve(DIST, 'geo') + }, { + from: path.resolve(SRC, 'images/icons'), + to: 'images/icons' + }, */{ + from: path.resolve(LIB, 'index.php'), + to: 'index.php' + }, + { from: 'src/images/footprint_mapbox.png', to: 'images' } + ], }), new SymlinkWebpackPlugin([ { origin: '../files/', symlink: 'files' }, diff --git a/src/components/project.vue b/src/components/project.vue index 959550b..95f4a1c 100644 --- a/src/components/project.vue +++ b/src/components/project.vue @@ -77,7 +77,7 @@ export default { if(sNewBaseMap) this.map.setLayoutProperty(sNewBaseMap, 'visibility', 'visible'); }, projectCodename(sNewCodeName, sOldCodeName) { - console.log('change in projectCodename: '+sNewCodeName); + //console.log('change in projectCodename: '+sNewCodeName); //this.toggleSettingsPanel(false); this.$parent.setHash(this.$parent.hash.page, [sNewCodeName]); this.init(); @@ -224,7 +224,7 @@ export default { }); //Markers - let aoMarkerSource = {type:'geojson', data:{type: 'FeatureCollection', features: []}}; + let aoMarkerSource = {type:'geojson', data:{type: 'FeatureCollection', features:[]}}; for(const oMsg of this.messages) { aoMarkerSource.data.features.push({ 'type': 'Feature', @@ -271,7 +271,7 @@ export default { */ } 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.addLayer({ 'id': 'markers', @@ -293,15 +293,15 @@ export default { .setLngLat(e.lngLat) .addTo(this.map); - let rProp = ref(e.features[0].properties); + let rProp = ref(e.features[0].properties);console.log(rProp); const vPopup = defineComponent({ extends: ProjectPopup, setup: () => { - console.log(rProp.value); + //console.log(rProp.value.medias); provide('options', rProp.value); provide('spot', this.spot); 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(() => { diff --git a/src/components/projectMediaLink.vue b/src/components/projectMediaLink.vue index 0c721fa..ec41d9c 100644 --- a/src/components/projectMediaLink.vue +++ b/src/components/projectMediaLink.vue @@ -43,7 +43,7 @@ export default { class="clickable" /> - {{ options.comment }} + {{ options.comment }}
diff --git a/src/components/projectPopup.vue b/src/components/projectPopup.vue index 71ef7f3..ba20d24 100644 --- a/src/components/projectPopup.vue +++ b/src/components/projectPopup.vue @@ -3,11 +3,13 @@ import { options } from 'lightbox2'; import projectMapLink from './projectMapLink.vue'; import spotIcon from './spotIcon.vue'; import projectRelTime from './projectRelTime.vue'; +import projectMediaLink from './projectMediaLink.vue'; export default { components: { spotIcon, projectMapLink, + projectMediaLink, projectRelTime }, //props: { @@ -17,7 +19,7 @@ export default { return { } }, - //inject: ['options', 'spot', 'project'], + //inject: ['options', 'medias', 'spot', 'project'], mounted() { } @@ -46,5 +48,8 @@ export default {

+

+ +

\ No newline at end of file