Favorite addresses
Let signed-in visitors save personal locations — home, work, kids’ school — and see commute distance and travel time from each saved address to every listing on your site.
What it does
Renders a small UI on the map letting visitors pin “starting points”. Once saved, the map and the summary table show distances and travel times from each starting point to the property and to the nearest POIs.
The saved addresses persist on the Yatmo side, keyed by a userId that you provide — so they survive across visits as long as you keep returning the same id for the same person.
How to enable
Add a userAddresses object to yatmoConfig:
yatmoConfig = {
licenseKey: '...',
language: 'EN',
container: 'map',
center: [4.3442926, 50.8520525],
zoom: 16,
userAddresses: {
userId: 'abc-123-your-internal-user-id',
startingLatitude: 50.8520525,
startingLongitude: 4.3442926
}
};
About the userId
Yatmo doesn’t know who your visitors are — you do. Pass whatever opaque id your auth system uses (database PK, hashed email, session id… your call). Same id on the next visit = same saved addresses come back.
userId can read their saved addresses through the map. Use values that are random / hashed (not raw emails or guessable counters), and never expose the id of one visitor to another.Notes
The map and the summary tables both honour saved addresses — once a visitor is recognised, travel-time columns appear automatically.
To inspect or delete saved addresses programmatically, call the corresponding endpoints on the REST API (contact info@yatmo.com for the exact paths if you need them).