Page 1 of 1
Disable scroll wheel zoom with Openstreetmap
Posted: 22 Dec 2018, 13:54
by arkham21
Hello,
Can you tell me how disable scrool wheel zoom with Openstreetmap ?
The option in the advanced setting seems work only with Google Maps.
Thanks for your help,
Arkham
Re: Disable scroll wheel zoom with Openstreetmap
Posted: 22 Dec 2018, 15:14
by christine
Hi Arkham,
do you mean the + - ? Then try to add to your template.css:
or:
Code: Select all
.leaflet-control-zoom-in, .leaflet-control-zoom-out {
display: none !important;
}
Kind regards
Christine
Re: Disable scroll wheel zoom with Openstreetmap
Posted: 22 Dec 2018, 16:46
by arkham21
Hi Christine,
No, I want to disable the zoom with the wheel of the mouse when the mouse is on the map.
Re: Disable scroll wheel zoom with Openstreetmap
Posted: 22 Dec 2018, 18:18
by christine
Hi Arkham,
OK. I found this:
https://www.mapbox.com/mapbox-gl-js/exa ... roll-zoom/ similar to this:
https://github.com/Leaflet/Leaflet/issues/2720
map.scrollWheelZoom.disable()
Above question, I will pass on to Jan.
Kind regards
Christine
Re: Disable scroll wheel zoom with Openstreetmap
Posted: 22 Dec 2018, 19:18
by arkham21
Hi Christine,
Thanks for your response.
This corresponds to what I'm looking for, but where do I need to insert the code ? I think it's when calling the creation of the map by Phoca Maps. Where did the call take place ? I'm looking some files but I can't find it...
Best regards,
Arkham
Re: Disable scroll wheel zoom with Openstreetmap
Posted: 29 Dec 2018, 01:40
by Jan
Hi, try to open this file:
administrator\components\com_phocamaps\helpers\phocamapsmaposm.php
line cca 250 and add before this code:
Code: Select all
$this->output[] = implode("\n", $o);
following code:
Code: Select all
$o[]= 'var map'.$this->name.$this->id.'.scrollZoom.disable();';
Jan
Re: Disable scroll wheel zoom with Openstreetmap
Posted: 20 Jan 2019, 18:33
by schwarzwaldbub
You can do this directly in your backend (current version of PhocaMaps). When you choose Phoca Maps you have on the right side the button "options" (with the cog). Here your can go to "OpenStreetMap" and at the option "Enable Mouse Wheel Zoom" you can set "no".
Best regards
Stefan
Re: Disable scroll wheel zoom with Openstreetmap
Posted: 27 Jan 2019, 20:01
by Jan
Ok, great, thank you for the info.
Jan