
Gentlemen, I’ve been through tens of code snippets and search results and had this entire forum browsed before I decided to post yet another topic on this that will hopefully get answered. Frankly I can’t believe this is not integral part of Google Map field settings in the first place and I don’t really want to hardcode this in the script, however I simply can’t figure out how to solve it with functions.php snippet or otherwise.
I want the map to automatically grab visitor’s coordinates and place a pin. Frontend form containing the map is called from within my page.php with
acf_form(array(
'post_id' => 'new_post',
'field_groups' => array( 72 ),
'new_post' => array(
'post_type' => 'post',
'post_status' => 'publish'
)
));
The map itself if working just fine – once a pin is dropped it will save the data and then center on it when post is viewed, I had this covered. All I need is to make it lock on visitor’s location upon form load. I tried all kinds of shenanigans but with no success. Please, help.
Actually ignore this. After going through plugin source I found out there is actually “Find my location” button but it’s been hidden within the search address field, which in my world qualifies as a major UX fail.