Home › Forums › ACF PRO › Default marker for maps › Reply To: Default marker for maps
Thanks, James. Although this method centers the map, it doesn’t pre-populate the address field or set a marker. And without setting a marker, get_field returns nothing, defeating the purpose of the default value.
And if the default were ever to change, a future person would have to know to edit our functions.php file, including lat and lng values.
The alternative, using the text field, requires first geocoding the text and then integrating those values into Google’s js embed code. I’d hoped to avoid that sort of mucking around.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.