Question:
How do I use getAddress to get the google formatted address into a string in the backend that I can use?
Code:
export function getAddress() {
return wixSite.generalInfo.getAddress();
}
getAddress()
.then( (address) => {
$w(“#address”).text = address.googleFormattedAddress;
});
Product:
Using online Wix Editor
What are you trying to achieve:
I need the google formatted business address in a string or variable I can use in a function.
What have you already tried:
Checked other forum posts, googled, and documentation.
I have no issues using this to get the address into a text field. I have tried different ways to get this to a string to use in a function, but I ether get NULL or promise. I even tried putting it in the text box and then pulling it back from there and it wouldn’t work. Any help here would be appreciated.