Gets the physical address of the site's business.
The getAddress()
function returns a Promise that resolves to the site's
corresponding physical address information.
The retrieved address is the address that has been entered in the General Info section of your site's Dashboard.
function getAddress(): Promise<GeneralInfoAddress>;
import { Permissions, webMethod } from "wix-web-module";
import wixSiteBackend from "wix-site-backend";
export const getAddress = webMethod(Permissions.Anyone, () => {
return wixSiteBackend.generalInfo.getAddress();
});
/*
* {
* "street": "235 W 23rd St",
* "city": "New York",
* "country": "USA",
* "state": "NY",
* "zip": "10011",
* "hint": {
* "text": "green building",
* "placement": "BEFORE"
* },
* "isPhysical": true,
* "googleFormattedAddress": "235 W 23rd St, New York, NY, 10011",
* "streetNumber": "235",
* "apartmentNumber": "12",
* "coordinates": {
* "latitude": "40.744869",
* "longitude": "-73.996736"
* }
* }
*/
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.