import { getEvents } from 'backend/events.jsw'; import wixWindow from 'wix-window'; $w.onReady(async function () { try { const location = await wixWindow.getCurrentGeolocation(); const events = await getEvents(location); $w('#repeater9').data = events.map(event => ({ _id: event._id, name: event.name, date: event.date, url: event.url, image: event.image })); // Keep the rest of your code related to the map as is $w('#googleMaps1').location = { 'latitude': location.coords.latitude, 'longitude': location.coords.longitude, 'description': 'Click HERE to see outdoor events in your area.' }; $w('#googleMaps1').show(); } catch (error) { console.error('Error fetching events:', error); } }); import { getEvents } from 'backend/events.jsw'; import wixWindow from 'wix-window'; $w.onReady(async function () { try { const location = await wixWindow.getCurrentGeolocation(); const events = await getEvents(location); $w('#repeater9').data = events.map(event => ({ _id: event._id, name: event.name, date: event.date, url: event.url, image: event.image })); // Keep the rest of your code related to the map as is $w('#googleMaps1').location = { 'latitude': location.coords.latitude, 'longitude': location.coords.longitude, 'description': 'Click HERE to see outdoor events in your area.' }; $w('#googleMaps1').show(); } catch (error) { console.error('Error fetching events:', error); } });
top of page

a

Coming Up Outdoor Events

I'm a paragraph. Click here to add your own text and edit me.
Let your users get to know you.

bottom of page