marker images
This commit is contained in:
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user