Search...
getAddress( )
Gets the physical address of the site's business.
Description
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.
Syntax
function getAddress(): GeneralInfoAddress
getAddress Parameters
This function does not take any parameters.
Returns
Fulfilled - An object containing the site's corresponding physical address information. Rejected - Error message.
Return Type:
Promise<GeneralInfoAddress>
NAME
TYPE
DESCRIPTION
street
string
Address street.
city
string
Address city.
country
string
Address country.
state
string
Address state.
zip
string
Address zip code.
hint
GeneralInfoAddressHint
Address description.
isPhysical
boolean
Whether the business has a physical address.
googleFormattedAddress
string
Address as formatted by Google.
streetNumber
string
Address street number.
apartmentNumber
string
Address apartment number.
coordinates
GeneralInfoAddressCoordinates
Address coordinates.
Was this helpful?
Get site's corresponding physical address information
Copy Code
1import wixSiteBackend from 'wix-site-backend';23export function getAddress() {4 return wixSiteBackend.generalInfo.getAddress();5}67/*8 * {9 * "street": "235 W 23rd St",10 * "city": "New York",11 * "country": "USA",12 * "state": "NY",13 * "zip": "10011",14 * "hint": {15 * "text": "green building",16 * "placement": "BEFORE"17 * },18 * "isPhysical": true,19 * "googleFormattedAddress": "235 W 23rd St, New York, NY, 10011",20 * "streetNumber": "235",21 * "apartmentNumber": "12",22 * "coordinates": {23 * "latitude": "40.744869",24 * "longitude": "-73.996736"25 * }26 * }27 */