Hello everybody I am getting the next error: 'Uncaught (in promise) ReferenceError: LWC component's @wire target property or method threw an error during value provisioning. Original error: [fillMapMarkersStructure is not defined]' I checked the spelling everything but I aint see any problem. Could anybody help me?
directionsListWired = [];
mapMarkers = [];
@wire(getDireccionesComunidadesEnergeticas)
wiredRelatedRecord(result){
const{data,error} = result;
if(data){
this.directionsListWired = data;
console.log('aqui...');
fillMapMarkersStructure();
}else if (error) {
this.isLoading =false;
this.records = undefined;
this.error = error;
}
}
fillMapMarkersStructure(){
console.log('Entro2');
this.mapMarkers = this.directionsListWired.map(direction => { return {
location: {
Street: direction.street,
City: direction.city,
PostalCode: direction.postalCode,
State: direction.country
},
title: direction.name
}
})
console.log('mapMarkers --> '+ this.mapMarkers);
}