Tagged: google maps, scrollable, Widget
-
AuthorPosts
-
November 11, 2015 at 12:22 am #533770
Awesome theme and best support! thanks you so much.
When I scroll through the page and mouse hits google maps widget it starts to scroll inside the widget. How can I prevent this from happening?
November 11, 2015 at 1:34 pm #533985Hi EvilMuelli,
That is the correct behaviour since the map is interactive, if you only want the default map then maybe it would be better to just display a screenshot of the map?
Regards,
RikardNovember 12, 2015 at 2:29 pm #534755Hi Rikard,
thanks for answering. I know of course it’s the “correct” behavior, but I simply don’t want this. Is there a way to keep google maps widget interactive (I want to be able to zoom in and out when hitting “+” or “-” buttons), but stop zooming in and out when I scroll down my website?
November 12, 2015 at 7:04 pm #535028Hey!
Actually the default behaviour should be that the mouse wheel does not effect the map zooming at all, http://kriesi.at/themes/enfold/pages/contact/.
Can you send us a link to your page so we can take a look? Are you using our google maps element or a plugin?
Cheers!
ElliottNovember 14, 2015 at 2:12 am #535788Hi Elliott,
as written in my first post I am talking about the widget in the footer. Sorry, I am on localhost right now, but simply put Google Map widget into your footer and you will see what I mean with zooming while scrolling the website. How can I prevent this?
Thanks!
November 19, 2015 at 4:51 am #538702Hi!
You need to set the scrollWheel parameter to false. Edit framework > php > class-framework-widgets.php file, look for the avia_printmap function. Inside the function, locate the map options or this block of code:
var myOptions = { zoom:".$zoom.", mapTypeControl:true, mapTypeId:google.maps.MapTypeId.".$type.", mapTypeControlOptions:{style:google.maps.MapTypeControlStyle.DROPDOWN_MENU}, navigationControl:true, navigationControlOptions:{style:google.maps.NavigationControlStyle.SMALL}, center:latlng };
.. add the parameter:
var myOptions = { zoom:".$zoom.", mapTypeControl:true, mapTypeId:google.maps.MapTypeId.".$type.", mapTypeControlOptions:{style:google.maps.MapTypeControlStyle.DROPDOWN_MENU}, navigationControl:true, scrollwheel: false, navigationControlOptions:{style:google.maps.NavigationControlStyle.SMALL}, center:latlng };
Remove browser cache then reload the page.
Best regards,
IsmaelNovember 19, 2015 at 3:32 pm #539054Thanks Ismael, but is there a solution which one could add to a child theme?
Awesome support guys! keep the good work.
Best regards!
November 21, 2015 at 2:10 am #540030 -
AuthorPosts
- You must be logged in to reply to this topic.