on a dynamic page i’m trying to connect the address in collection that was created with google places API using the wix user address input
I have tried several code variations as follows
let myLocation = $w(“#googleMaps1”).location;
let txtGoogleMapsName = $w(‘#someDataSetName’).getCurrentItem().title; let txtGoogleMapsLat = $w(‘#someDataSetName’).getCurrentItem().latitude; let txtGoogleMapsLong = $w(‘#someDataSetName’).getCurrentItem().longitude;
I would love to screen shot the database entry based on the api places input but I know it’s in address format. So how do separate the address from the number because I guess if I change the field key to number only it still won’t work. Sorry this is a mobile response.
ok so i changed the field key from address to number but this hasn’t worked on its own. in the code above if its correct is lat, long and description picking up the correct values ?
.getCurrentItem() is for dynamic dataset.
Adam, your description is not detailed enough and it’s hard to understand, what values you have in your collection.
I think i’m getting there but let address = $w(“#”).value; is neither the field key (ltrAddress) or googleMaps1 and i do not have another page element ?
I don’t understand what you’re doing and what you’re trying to do.
what is $w(“#”).value. It’s not a valid selector.
and why do you have a } in line 32?
and delete line 35.