Events and the organisation profile now have an address, with a "Directions" link and an embedded Google Maps view (no API key required) shown on event pages, event cards, and the Contact page. New events default their location to the org's configured address.
10 lines
462 B
TypeScript
10 lines
462 B
TypeScript
/** Opens Google Maps with the address pre-filled — no API key required. */
|
|
export function mapsSearchUrl(address: string): string {
|
|
return `https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(address)}`;
|
|
}
|
|
|
|
/** Embeddable Google Maps iframe src for the given address — no API key required. */
|
|
export function mapsEmbedUrl(address: string): string {
|
|
return `https://maps.google.com/maps?q=${encodeURIComponent(address)}&output=embed`;
|
|
}
|