-
-
You advised me to ask you here about how I can prevent the google map from auto zooming when using the scroll wheel to go down the page. Any help is greatly appreciated.
-
Hello,
Please edit the file ‘specular/vc_templates/google_map.php’.
Find the line:$output .= '<div class="row-fluid row-google-map " style="position:'.$position.'; height:'.esc_attr($height).'px;"><iframe class="googlemap '.$extra_class.'" style="height:'.$height.'px;" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="'.esc_url($dynamic_src).'&output=embed"></iframe><div class="desc">'.$desc.'</div>';
and replace with:
$output .= '<div class="row-fluid row-google-map " style="position:'.$position.'; height:'.esc_attr($height).'px;"><iframe class="googlemap '.$extra_class.'" style="height:'.$height.'px;pointer-events:none" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="'.esc_url($dynamic_src).'&output=embed"></iframe><div class="desc">'.$desc.'</div>';
Edit the file ‘specular/js/main.js’
Add this code at the end of the file:
https://codeshare.io/VauxtThis way the map won’t zoom on window scroll, but the zoom will be enabled when clicking on map.
Best regards!
- This reply was modified 8 years, 9 months ago by Ruco.
-
Viewing 1 reply thread
You must be logged in to reply to this topic.