egeloen / ivory-google-map

Google Map API v3 integration for PHP 5.6+.
MIT License
325 stars 185 forks source link

scrollwheel #231

Closed hamid80386 closed 7 years ago

hamid80386 commented 7 years ago

When you want to disable map's scroll zoom, need to: $map->setMapOption('scrollwheel', false);

but we have an problem, if you only want disable scroll wheel zoom in some resolution like mobile display, then server side found a problem,, if we be in clientside and make map with javascript, may be can to set up disable this option in some responsive mode, because we have an object in client side, but what is your solution for server side? Do you want to use of setHtmlId method?

hamid80386 commented 7 years ago

I'd ask question very soon, by a quick search in ivory-google-map's readme, i founded the solution.

first must add javascript variable name in php section code: $map->setVariable('map001');

then in the javascript section (i used jquey), and in change resolation part, when page resize to mobile or tablet size, we must using this code: map001.setOptions({ scrollwheel: true });