hpneo / gmaps

the easiest way to use Google Maps
https://hpneo.dev/gmaps/
7.04k stars 1.29k forks source link

Use two fingers to move the map #574

Open nauman-ullah opened 6 years ago

nauman-ullah commented 6 years ago

I am getting this message " Use two fingers to move the map" on mobile devices on the integration of gmaps.js. Bit explored, and found that

gestureHandling: 'greedy'

is not implemented. Can you please give me any direction how to achieve map movement on mobile devices with a single finger

Regards

davidcafu412 commented 6 years ago

Hi @nomanullahgroupdocs, have you found any solution to this?

nauman-ullah commented 6 years ago

@davidcafu412 its simple. Edit gmaps.js

options.zoom = options.zoom || 15; options.gestureHandling = 'greedy'; // set gestureHandling, as gmap picking default options options.mapType = options.mapType || 'roadmap';

davidcafu412 commented 6 years ago

@nomanullahgroupdocs Cool. It's been sometime since I looked at my code where I used gmaps.js. But I did something similar to your solution. Instead of editing the gmaps.js, I just assign a value to the gestureHandling property.

gmapTrip.gestureHandling = 'greedy';

Thanks anyways. For sharing. Cheers

cresuspouh commented 2 years ago

@davidcafu412 https://github.com/hpneo/gmaps/issues/574#issuecomment-399642800 trick did the job. thanks.