Repeating

Hello
I’ve been using this forum and found so many tips and fixes but this one I feel is specific.
I have managed to link my database to map locations becsuse I want to show locations of all my website’s users offices however I found out you can’t use Maps on a repeat page.
I have tried using a light box to show a map for each office but the repeat doesn’t work for the light box either.
Is there a way around this which will allow me to show a map linked to my data set of each office?

Are you using a repeater for this? Is that what you mean by repeat?

Hi David, yes that’s correct, I am using a repeater and trying to link a lightbox to each line to show a map location for each office I have in my database. Since this post I have found a code to link the map locations but I can’t quite seem to get it right.

I’m guessing your links are inside the repeater in which case, you need to click its ItemReady property in the properties panel, and then you need something like this in your code:

export function repeater_itemReady($item, itemData, index) {
    const mapLink = itemData.mapData;
    $item('#mapTrigger').onClick(()=>{
        $w('#googleMaps1').location = mapLink;
    }
}

You can try this on the page and with the lightbox.

Thanks David I appreciate you showing me that code. I will give it a try this evening when I get back from work. Thanks for your help.