Tagged: Google Maps API
-
AuthorPosts
-
September 14, 2018 at 3:47 pm #1009903
Hi guys. How to make it possible to change the scale by mouse scroll on google maps?
September 15, 2018 at 8:18 am #1010022Hey pddcoms,
I’m getting a 404 error on the page you linked to, please check and repost.
Best regards,
RikardSeptember 18, 2018 at 12:19 pm #1011224September 19, 2018 at 3:30 am #1011590Hi,
Thank you for using Enfold.
Based on Dude’s suggestion, you can try this code on the functions.php file to adjust the map’s parameter.
add_filter('avf_gmap_vars', 'avf_gmap_vars_settings', 10, 1); function avf_gmap_vars_settings($map) { foreach($map['av_google_map'] as $key => $data) { $map['av_google_map'][$key]['gestureHandling'] = 'auto'; $map['av_google_map'][$key]['scrollwheel'] = 'true'; } return $map; }
Best regards,
IsmaelSeptember 19, 2018 at 2:08 pm #1011813Hi,
You also need to replace the file enfold\framework\js\conditional_load\avia_google_maps_api.js
with
Do not forget to make a backup of the original file for a fallback and to clear server and browser cache.
Use the following code in functions.php:
add_filter('avf_gmap_vars', 'avf_gmap_vars_settings', 10, 1); function avf_gmap_vars_settings($map) { foreach($map['av_google_map'] as $key => $data) { $map['av_google_map'][$key]['gestureHandling'] = 'greedy'; $map['av_google_map'][$key]['scrollwheel'] = true; } return $map; }
Use values for gestureHandling according to https://developers.google.com/maps/documentation/javascript/interaction
The fix in js file will be added in (one of) the next update(s).
Best regards,
GünterSeptember 19, 2018 at 2:19 pm #1011816This reply has been marked as private.September 19, 2018 at 3:54 pm #1011872Hi,
Please open an own topic for that and create an admin account for us. You can post the credentials and the link to the backend in private content there.
WP 4.4.2 is outdated – you should update to latest WP version 4.9.8. And also update Enfold to 4.4.1. There had been major changes in the Google Maps API and Enfold only supports this in the latest version as this also required changes in php and js code.Best regards,
Günter -
AuthorPosts
- You must be logged in to reply to this topic.