现在我在使用点击事件时遇到了问题。
我想要Event touchstart。
相机在我的位置移动的打开应用程序时应用程序的功能。 我的应用程序使用了cordova angularjs和插件phonegap-googlemaps-plugin。 如果事件触发,则相机不会沿着我的位置移动。
我没有使用过touchend。
如果我必须设置map.setClickable(false)
。
我不能通过触摸在地图上移动,但我可以使用事件触摸开始。 我可以通过其他方式继续沿着地图移动并使用touchstart。 我想通过触摸移动地图,我想使用Event touchstart。
答案 0 :(得分:0)
现在我将使用解决问题。 getMyLocation call()方法和监听事件。 CAMERA_CHANGE
如果相机的位置超出一定限度。要遵循设定的条件,相机不会移动到我的位置。
function onMapCameraChanged(position)
{
lat = position.target.lat;
lng = position.target.lng;
map.getMyLocation(oncheckmylocation);
}
function oncheckmylocation (location)
{
mylocation_lat = location.latLng.lat;
mylocation_lng = location.latLng.lng;
if((lat>=mylocation_lat+0.001||lat<=mylocation_lat-0.001||lng>=mylocation_lng+0.001||lng<=mylocation_lng-0.001)&auto_move_camera==true)
{
auto_move_camera = false;
}
}