捏缩小在谷歌地图Android中? [英] Pinch Zoom out in Google Maps in Android?

查看:120
本文介绍了捏缩小在谷歌地图Android中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发中,我使用的JavaScript的V3库的PhoneGap谷歌地图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.

我将AP preciate如果有人建议我怎么可以分别获得双指缩放不使用谷歌地图的默认缩放控件?

I'll appreciate if someone suggest me how I can get 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.

因为你正在为Android原生你的第二个选择是使用谷歌地图在Android(然而,这是Java的JavaScript不)。 http://mobiforge.com/developing:您可以在此发现这里的基础教程/剧情/使用,谷歌,地图,安卓

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

这篇关于捏缩小在谷歌地图Android中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆