Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1302782

    Is there a way to disable double click zoom on Google maps with Enfold?

    I already disabled the Zoom controls on the Google element.
    I work with Enfold Child

    Thanks a lot

    #1303212

    nobody can help? Thanks

    #1303331

    Hi,

    Thank you for the inquiry.

    This should be possible by editing the current map options in the enfold/framework/js/conditional_load/avia_google_maps_api.js, look for this code around line 147:

    mapMaker: false, //mapmaker tiles are user generated content maps. might hold more info but also be inaccurate
    				backgroundColor: this.$data.backgroundColor,
    				streetViewControl: this.$data.streetview_control,
    

    Below, add this new option.

    disableDoubleClickZoom: true,
    

    Based on: https://developers.google.com/maps/documentation/javascript/reference#MapOptions

    Please toggle or temporarily disable the Enfold > Performance > File Compression settings after the modification.

    Best regards,
    Ismael

    #1303382

    Thank you Ismael for this answer. I just made the change and it works very well. Thank you. However, every time I update Enfold, I will have to put this code back. Is there any way to add a code on Enfold child that I work with?

    I have, if I may, 2 other questions that I can’t figure out on this same asian.estate site.

    1. on the Newsroom page: https://www.asian.estate/the-news-of-the-real-estate-in-thailand/ I can’t manage to align the image thumbnails of the posts on the left, when a new post is created. As you can see the last post is centered ?

    2. On the page https://www.asian.estate/home-4/ which has a transparent header, I just want to put the logo on this page which is on all the other pages with non transparent header. Please tell me what to do, I can’t find it on the Enfold forum.

    Thanks Ismael

    #1303487

    The code you provided #613208 does not work if the page has a transparent header
    Enfold Child: Theme Functions (functions.php)

    add_filter(‘avf_logo’,’av_change_logo’);
    function av_change_logo($logo)
    {
    if(is_page(36653) )
    {
    $logo = “https://www.asian.estate/wp-content/uploads/2020/08/logo2.png”;
    }
    return $logo;
    }

    Thanks a lot

    Thanks

    #1303675

    Thank you Ismael or Rikard for helping me to finalize these problems

    #1303702

    Hi,

    You can override the avia_google_maps_api.js file by dequeueing it using its handle avia_google_maps_api_script.

    function ava_admin_enqueue_scripts() {
        wp_deregister_script( 'avia_google_maps_api_script' );
        wp_dequeue_script( 'avia_google_maps_api_script' );
    }
    add_action( 'admin_enqueue_scripts', 'ava_admin_enqueue_scripts', 10 );
    

    Yon can then register the modified script back using the new path in the child theme directory.

    // https://developer.wordpress.org/reference/functions/wp_enqueue_script/

    Please note that this might affect the privacy options, if it is enabled, because the theme will not be able to stop the script from executing even if the map scripts are supposed to be blocked.

    If you have any additional questions at this time we kindly ask that you open them up in a separate thread. The longer threads get in the forum, they become more difficult to support as they tend to drift off topic and they also make it troublesome for users trying to search for solutions. Keeping threads relevant to their original inquiry ensures that we can keep better track of what has been resolved and that users can more effectively find answers to similar issues they might be experiencing.

    Thanks!

    Best regards,
    Ismael

    #1303978

    Ok. Thanks a lot Ismael.

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘How to disable Google maps zoom double click right (+) or left (-)’ is closed to new replies.