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 »

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: 47794
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Two finger scrolling

Post by Jan »

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 »

Hi Jan,
It worked, thanks for the help!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47794
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Two finger scrolling

Post by Jan »

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
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47794
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Two finger scrolling

Post by Jan »

Hi, implemented in version 3.0.12

https://www.phoca.cz/news/1132-phoca-ma ... 2-released

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