Do you have any advice on this two topic:
– Set user location as map center (if they agree to the browser alert, of course, otherwise a default map center is shown)
– transform the search form in a radius search form – i.e. when the user search a place, a map with the nearest existing location (say within 20km) will be shown
I could not find solutions to this here or online, although some users were asking similar questions. Any suggestion is super welcome!
Hi @alitscha
I’m afraid this topic is more related to Google Maps than ACF. Could you please visit Google Maps community instead?
Also, if you want to modify the map on the backend, you can add extra arguments by using JavaScript. This page should give you more idea about it: https://www.advancedcustomfields.com/resources/adding-custom-javascript-fields/.
If you want to do it on the front-end, then you need to modify your Google Map script. This page should give you more idea about it: https://www.advancedcustomfields.com/resources/google-map/.
Thanks 🙂
@alitscha You can use this a starting point. Either with the WP_Query
or the rest api
Reference link