Re: [PhoneGap] PhoneGap zoom-in and zoom-out (Pinching) on Google map

1,066 views
Skip to first unread message

Philipp Austermann

unread,
Jun 24, 2012, 1:47:44 AM6/24/12
to phon...@googlegroups.com, u me
Hi,

you didn't specify what phone and OS you are testing on, but if i may
take the guess it's an android 2.x device?

The stock browser of these doesn't generate the multitouch gestures in
javascript. Phonegap doesn't fix this (yet ?).

Please have a go at
https://github.com/Philzen/webview-multitouch-polyfill, which is still
rather alpha, but the current version successfully re-enables the
notorious pinch-zoom on OSM & google maps on my phone.

Feel welcome to report your experiences with your own phone and add to
the Device List on the Wiki:
https://github.com/Philzen/webview-multitouch-polyfill/wiki (or file a
bug) - every bit of feedback will help the project.

Cheers - Phil

Am 23.06.2012 21:48, schrieb u me:
> Hi All,
>
>
> Phonagap + jqurey mobile using i am developing a google map.
> in device map is working fine using zoomin '+' and zoomout '-' Button.
> but i need to develop my application which will use the 2 finger touch
> (pinching)
> for zoom-in and zoom-out.
>
> is PhoneGap provides any Api for (pinching) zoomin and zoomout.
> if anyone implemented please Help me...
>
> Thank you
> Umesh lakka
>
>
> --
> -- You received this message because you are subscribed to the Google
> Groups "phonegap" group. To post to this group, send email to
> phon...@googlegroups.com To unsubscribe from this group, send email
> to phonegap+u...@googlegroups.com For more options, visit this
> group at http://groups.google.com/group/phonegap?hl=en?hl=en For more
> info on PhoneGap or to download the code go to www.phonegap.com To
> compile in the cloud, check out build.phonegap.com


Philipp Austermann

unread,
Jun 27, 2012, 12:23:32 AM6/27/12
to u me, phon...@googlegroups.com
Hey u me,

have you had a chance to try the multitouch polyfill?

In the meanwhile i was able to build a phonegap-compatible version, usage instructions may be found on https://github.com/Philzen/webview-multitouch-polyfill/

If you do, please please report your success or problems and on the wiki or the issues tracker, we really need all the feedback we can get. Cheers!

Am 24.06.2012 21:13, schrieb u me:
Hi, Cheers phil

Thank you for your reply

I am new one in PhoneGap and i tried many way to do the pinching zoom. I will try it later.

For these application i am using  MEDIATEK (device) with Android 2.3.1

And using PhoneGap i am capturing Image in phone (device) and i have to submit it to the server. and i was gone through this link   

where the code given but its not working. Showing error as Upload failed: Code 3 
This code is working in iOS. but using Android device its showing error.

Using phoneGap how i will upload the captureed image to the server.

Please help me
Thank you.

But the code is is correct but using phoneGap its not working.
--
Regards
Maharudrappa lakka



Melvin K.

unread,
Jan 27, 2013, 8:14:28 PM1/27/13
to phon...@googlegroups.com, u me
Hi Phil,

I just came across this thread as I was searching for solutions to the fact that the pinch-zoom gesture seems to be terribly implemented in Android Webviews...not just Android 2.X, but it's awful on my 4.0.3 device too.

I'm trying to get a decent pinch-zoom on a google map in my phonegap project. While the gesture is indeed supported in the Android 4 webview natively, the implementation is just not good. When I zoom out, about half the time I get thrown to a much father-out zoom level and much farther northwest than expected. It makes using pinch-zoom on maps unusable.

I found a blog post about google maps in webviews in general, with the following demo: http://www.svennerberg.com/examples/mobile-map/ . Viewing that on my 4.0.3 phone, it exhibits exactly the same buggy pinch-zoom that I observed in my own app.

So, my question is.... Can your WMP solution be used with Android 4+ phones to replace the buggy native pinch-zoom action? I see in WebClient.java where you build the view conditional on the Android SDK number... Can that just be changed? Any issues you can think of?

Thanks!
Reply all
Reply to author
Forward
0 new messages