I’m trying to connect a button so that when it is clicked it will appear with the marker I created in association with the location on Google Maps (provided by Wix). I followed the code from Corvid Reference in regards to setting a map location info:
$w("#myGoogleMap").location = {
"latitude": 37.77065,
"longitude": -122.387301,
"description":"Wix Office"
};
and connecting it to my button:
export function button20_click(event) {
$w('#googleMaps2').location = {
"latitude": 32.7904,
"longitude": 79.9396,
"description": "Darling Oyster Bar"
};
}
Surprisingly it actually worked for that instance. But for every other button, it just defers back to this specific location in the code above. One of my markers even disappeared. Any reasoning on why this is happening? And how to fix it? Thanks!