Home › Forums › ACF PRO › Google Map Satellite › Reply To: Google Map Satellite
I think, instead of modifying the core files, you can use the following code instead:
add_action('acf/input/admin_footer', 'my_acf_change_map_to_satelite');
function my_acf_change_map_to_satelite() {
?>
<script type="text/javascript">
(function($) {
acf.add_filter('google_map_args', function( args, $field ){
// Change Map to Satellite
args['mapTypeId'] = 'satellite';
// return
return args;
});
})(jQuery);
</script>
<?php
}
This page should give you more idea about it: https://www.advancedcustomfields.com/resources/adding-custom-javascript-fields/.
I hope this helps ๐
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!
๐ ACF & ACF PRO 6.0.7 are now available.
— Advanced Custom Fields (@wp_acf) January 18, 2023
โจThis release contains bug fixes and improvements while we continue to work on the next major release of ACF.https://t.co/wQgAOpwmUI
© 2023 Advanced Custom Fields.
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.