开发者

Pinch Zoom out in Google Maps in Android?

I am developing an application in Android in which I'm using google map using the Javascript V3 library with Phonegap. It works fine for me until I noticed that map is zooming in on touch event but couldn't able to zoom out when I tried for number of times.

I'll appreciate if someone suggest me how I can ge开发者_JAVA百科t the pinch zoom in and out without using the default zoom controls of Google Maps?


Unfortunately there is no built-in function for this (not yet anyway), so in order to make it work you will have to create your own custom control for this action. This means capturing the touch event and zooming according to the gesture. To go into a little more details on this, have a control over the map canvas, and in it capture the touch events.

Your second option since you are building for Android native is to use google maps from android (however this is java not javascript). You can find a basic tutorial on this here: http://mobiforge.com/developing/story/using-google-maps-android

Hope this helps, Vlad

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜