Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello @an2design4c,
    There is no such option on the theme for now. So, the only way would be code customization. For that, just go to \assets\js\evision-corporate-custom.js, there you will see ‘zoom’ at line 5. You can adjust it according to your requirement.
    But while customizing, do create a child theme. You can take help from the given link while creating the child theme: https://codex.www.ads-software.com/Child_Themes#How_to_Create_a_Child_Theme

    Thanks for choosing evision corporate.

    Regards,

    Thread Starter an2design4c

    (@an2design4c)

    I already have a child theme built.

    I downloaded the /assets/js/evision-corporate-custom.js; made a change to the ‘zoom’ number; then uploaded the file to /themes/evision-corporate-child/assets/js. The map is still at the same zoom level.

    Is there another step I need to take to have this function from the child theme?

    Hello @an2design4c,
    Please go throgh the following steps to change the initial zoom level of the map:
    1. Create Child theme of the original theme (Please see https://codex.www.ads-software.com/Child_Themes#How_to_Create_a_Child_Theme).

    2.Then copy and paste assets folder of parent theme into child theme.

    3. Go to assests->js-> evision-corporate-custom-js and inside it go to line No.5 and type the value of zoom level you like to show in the map, by default it’s value is set to 4.

    4. Go to Child theme ->functions.php, then write following code inside it:

    <?php
    //
    // Recommended way to include parent theme styles.
    
    add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
    function theme_enqueue_styles() {
       wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
    
       wp_deregister_script('evision-corporate-custom'); // Deregister parent scripts file
    
       wp_enqueue_script( 'evision-corporate-custom', get_stylesheet_directory_uri() . '/assets/js/evision-corporate-custom.js', array('jquery'), '4.0',  true ); //replaced by new scripts in child
    }?>

    I hope this will help to solve your issue.
    Thanks for your time!

    Thread Starter an2design4c

    (@an2design4c)

    Thanks! It took me a minute figure out that I didn’t need to add this code to an existing copy of the functions.php located in my child theme, but instead just use only this code in the child theme functions.php.
    Works perfectly.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Map Section Zoom’ is closed to new replies.