I’m new to Weweb and I’d like to bind the result of a searchbar value to the markers of the map element.
I created the workflow
- Make this variable change depending of the searchbar value
→ But now i lack the connexion with the map
Unfortunately, map element markers are not yet “bindable” with external data. However, you can use the HTML element with a Google map iframe. Here is how you can add it to your page:
- Add the element in your page
- Then instead of “copying and pasting” directly in the formula, it’s better to create a function. You will see, it’s not that hard .
Here is the code you can add:
Don’t forget to add a Parameter called search, here:
And you API key here:
- Then you can select your HTML element and click on the plug button to use your brand-new custom function. Like this
- Then go click on your custom function
And add your variable between the parenthesis
And here you go
You can find all the properties you can use with the map here: Embedding a map | Maps Embed API | Google Developers
You just need to update the custom function to add and manage more properties. Feel free to ask if you need help with this.
Tell us if that worked for you
Thanks a lot ! I’ll try it soon