Home › Forums › Feature Requests › Map field – ability to change a default map type › Reply To: Map field – ability to change a default map type
With a nudge in the right direction from ACF support, I was able to achieve exactly what I wanted, namely removing some controls from my acf_form front-end Google Map inputs, via the ‘new’ JavaScript API’s google_map_args
filter found at https://www.advancedcustomfields.com/resources/javascript-api/#filters-google_map_args
acf.add_filter('google_map_args', function( args, field ){
args[ 'mapTypeControl' ] = false;
args[ 'streetViewControl' ] = false;
args[ 'fullscreenControl' ] = false;
return args;
})
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.