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
Disable scroll wheel zoom with Openstreetmap
-
- Phoca Newbie
- Posts: 3
- Joined: 22 Dec 2018, 13:44
-
- Phoca Hero
- Posts: 2819
- Joined: 28 Nov 2010, 17:20
Re: Disable scroll wheel zoom with Openstreetmap
Hi Arkham,
do you mean the + - ? Then try to add to your template.css:
or:
Kind regards
Christine
do you mean the + - ? Then try to add to your template.css:
Code: Select all
.leaflet-bar {
display: none;
}
Code: Select all
.leaflet-control-zoom-in, .leaflet-control-zoom-out {
display: none !important;
}
Christine
-
- Phoca Newbie
- Posts: 3
- Joined: 22 Dec 2018, 13:44
Re: Disable scroll wheel zoom with Openstreetmap
Hi Christine,
No, I want to disable the zoom with the wheel of the mouse when the mouse is on the map.
No, I want to disable the zoom with the wheel of the mouse when the mouse is on the map.
-
- Phoca Hero
- Posts: 2819
- Joined: 28 Nov 2010, 17:20
Re: Disable scroll wheel zoom with Openstreetmap
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
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
-
- Phoca Newbie
- Posts: 3
- Joined: 22 Dec 2018, 13:44
Re: Disable scroll wheel zoom with Openstreetmap
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
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
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Disable scroll wheel zoom with Openstreetmap
Hi, try to open this file:
administrator\components\com_phocamaps\helpers\phocamapsmaposm.php
line cca 250 and add before this code:
following code:
Jan
administrator\components\com_phocamaps\helpers\phocamapsmaposm.php
line cca 250 and add before this code:
Code: Select all
$this->output[] = implode("\n", $o);
Code: Select all
$o[]= 'var map'.$this->name.$this->id.'.scrollZoom.disable();';
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 2
- Joined: 20 Jan 2019, 18:26
Re: Disable scroll wheel zoom with Openstreetmap
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
Best regards
Stefan
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Disable scroll wheel zoom with Openstreetmap
Ok, great, thank you for the info.
Jan
Jan
If you find Phoca extensions useful, please support the project