Dynamic Pages and Google Maps

I see this issue has been addressed in the forum several times, but after reading through all the posts I still cannot get this to work. I am new to WIX and a beginning coder. I am building a RV campground website with a campground directory. I have created the database and the dataset. I am trying to use this code that seems to work for others, but I am getting an error message that “#googleMaps1” is not a valid selector. Any help will be so appreciated!!

$w.onReady( function () {
$w(" #dynamicDataset “).onReady( () => {
let currentItem = $w(” #dynamicDataset “).getCurrentItem();
$w(” #googleMaps1 ").location = {
“latitude”: currentItem.latitude,
“longitude”: currentItem.longitude,
“description”: currentItem.mapdescription
};
} );
} );

Hello,

my guess would be that your google maps component id is different. Click on the google maps component on your site and check it’s id. It should appear on the left top corner of your component.

Hope this helps!

Juste

Thank-you so much. I will check that out.