CGGoogleMaps2: preventing zoom with scroll wheel

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
Guido
Forum Members
Forum Members
Posts: 221
Joined: Sat Aug 29, 2009 3:00 pm

CGGoogleMaps2: preventing zoom with scroll wheel

Post by Guido »

I know the V3 API for Google Maps has the option to prevent scroll wheel zooming, but does anyone have an idea how to set this option for the CGGoogleMaps2 module?

http://stackoverflow.com/questions/2330 ... e-maps-api
arstach
Forum Members
Forum Members
Posts: 27
Joined: Tue Jun 01, 2010 5:21 pm

Re: CGGoogleMaps2: preventing zoom with scroll wheel

Post by arstach »

same one raised a week earlier: http://forum.cmsmadesimple.org/viewtopi ... =7&t=72050

it looks like calguy1000 is our only hope... after all it's his project
User avatar
blast2007
Power Poster
Power Poster
Posts: 508
Joined: Wed Aug 01, 2007 5:36 pm

Re: CGGoogleMaps2: preventing zoom with scroll wheel

Post by blast2007 »

Is this topic "CGGoogleMaps2 - how to disable scrollwheel?" related?
arstach
Forum Members
Forum Members
Posts: 27
Joined: Tue Jun 01, 2010 5:21 pm

Re: CGGoogleMaps2: preventing zoom with scroll wheel

Post by arstach »

well... isn't it?

for me, both topics are basically about the same issue: how to turn off scrollwheel
User avatar
blast2007
Power Poster
Power Poster
Posts: 508
Joined: Wed Aug 01, 2007 5:36 pm

Re: CGGoogleMaps2: preventing zoom with scroll wheel

Post by blast2007 »

Sorry, my bad!
:D
Guido
Forum Members
Forum Members
Posts: 221
Joined: Sat Aug 29, 2009 3:00 pm

Re: CGGoogleMaps2: preventing zoom with scroll wheel

Post by Guido »

I saw there is the option to do this in the Google Maps API, in the link I provided in the initial post. Maybe I can find out which module file sends these options to Google Maps and hack into it, but this would be dangerous when you update the module.
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: CGGoogleMaps2: preventing zoom with scroll wheel

Post by velden »

It is possible to set options after loading the map. However, I didn't yet succeed doing so by script inside template(s).

When using a web inspector it's possible but typically at that time the maps is already there.

Code: Select all

$("[id^=cggm_map_]").data().calguy1000Cggm2.getMap().set("scrollwheel",false)
Didn't yet check whether it is very dynamic this way. I think it needs to be called after the map is loaded. Not sure how to do that exactly.
Post Reply

Return to “Modules/Add-Ons”