Hello, I am creating a page with a dropdown to filter to a specific database item for a google map (and other info). Everything works great in preview...the map updates to a new location based on the dropdown value. In the published version, the map doesn't change locations when the dropdown selection changes. All the other items...address, image, etc...work fine in preview and publish.
I know issues that pop up in publish but not preview are usually related to permissions, but the dataset loaded on the page is set to read-write, and the collection is set so anyone can make changes.
//individual facilities code below
let selectedLongitude = "";
let selectedLatitude = "";
export function facilityDropdown_change(event, $w) {
$w("#facilitiesdata").onCurrentIndexChanged((index) => {
let itemObj = $w("#facilitiesdata").getCurrentItem();
selectedLongitude = itemObj.longitude;
selectedLatitude = itemObj.latitude;
console.log(selectedLatitude)
$w("#googleMaps1").location = {
"latitude": selectedLongitude,
"longitude": selectedLatitude,
};
})
}
Help!
It still does not work.
everything is fine in the preview mode and when published map does not works
I tried this again and everything seems to be working now. Perhaps it was a temporary network problem, or an issue with Google (from Wix), but whatever... it seems OK now.
Please try this again and let me know how it goes.
Got it, thanks for elaborating. If there is a bug in the googlemap component, when would we know and how long would it take to fix?
I just added the description and it didnt seem to change anything in the published site.
Did you sync the sandbox (preview) database with Live?