Two finger scrolling

Phoca Maps - displaying maps in Joomla! CMS
ynamsa
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 08 May 2021, 18:01

Two finger scrolling

Post by ynamsa » 10 May 2021, 10:10

I would like my Phoca Map to work the traditional way, so it doesn't move when I scroll the page (with mouse, or with one finger on mobile). I read that I have to set this with the gestureHandling parameter, a cooperative property. How?
Is this possible to set in the "custom option" field?

Tags:

User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 44015
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Two finger scrolling

Post by Jan » 12 May 2021, 12:02

Hi, what do you mean with "custom option"?

What do you mean with "doesn't move"? Do you mean this behaviour (see latest map):

https://www.phoca.cz/joomla3demo/phoca-maps-demo (this map is added with iframe method, so it gets the default options from Google maps)


gestureHandling - there is no such option yet (I added this to feature request list), for now you can add it to map output with template override:

components\com_phocamaps\views\map\tmpl\default.php

Line cca 121:

Code: Select all

echo $map->setMapOption('gestureHandling', '"cooperative"').','."\n";
//echo $map->setMapOption('scrollwheel', $this->map->scrollwheelzoom).','."\n";
When adding the first row, the existing parameter for "scrollwheel" needs to be comented.

Jan
If you find Phoca extensions useful, please support the project

ynamsa
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 08 May 2021, 18:01

Re: Two finger scrolling

Post by ynamsa » 17 May 2021, 19:45

Hi Jan,
It worked, thanks for the help!

User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 44015
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Two finger scrolling

Post by Jan » 17 May 2021, 20:32

Ok, thank you for the info, added to feature request list for next version.

Jan
If you find Phoca extensions useful, please support the project

Post Reply