Dynamic google maps in lightbox

I have a dynamic page showing the different departments our store has. There I also have a dynamic google maps I want Google Maps to open up in a lightbox. The problem I have is that I do not know how the lightbox should show the correct address. The Lightbox does not know which page you are from

Can you use wixWindow.openLightbox for this? And how do I do that?

Hi,
You can do the following:

  1. Send an object with the coordinations of the location using the openLightbox function
  2. On the lightbox you should get the object sent to the lightbox using the getContext function.
  3. Add a Google Map to the lightbox.
  4. Set the location to the Google Maps app.

Thanks,
Tal.

Can you show me how the code should look like? Because I tried this, but it did not work. Here is my code: