大佬教程收集整理的这篇文章主要介绍了android – 如何检测我的位置不再显示在地图上(导航后)?,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
@Override public Boolean onTouchEvent(MotionEvent event,MapView mapView) { Log.e("Touch",Integer.toString(event.getAction())); int action = event.getAction(); if (action == MotionEvent.ACTION_DOWN) { touchStarted = true; } else if (action == MotionEvent.ACTION_MOVE) { if (event.getPointerCount() > 3) moveStarted = true; return true; } return true; }
但我怎么检测到我的当前位置不再在屏幕上?
private void checkVisibility(Marker myPosition) { if(googleMap != null) { //This is the current user-viewable region of the map LatLngBounds bounds = googleMap.getProjection().getVisibleRegion().latLngBounds; if(bounds.contains(myPosition.getPosition())) //If the item is within the the bounds of the screen else //If the marker is off screen } }
以上是大佬教程为你收集整理的android – 如何检测我的位置不再显示在地图上(导航后)?全部内容,希望文章能够帮你解决android – 如何检测我的位置不再显示在地图上(导航后)?所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。