【问题标题】:Android - Disable Pinch Zoom Control in Google Maps APIAndroid - 在 Google Maps API 中禁用捏合缩放控制
【发布时间】:2011-06-21 08:44:51
【问题描述】:

我想禁用通过捏合来放大我的应用的控制。我该如何设置呢?

【问题讨论】:

  • 重复此回答 question.
  • 但问题得到了正确的回答......

标签: java android google-maps-api-3 zooming


【解决方案1】:

禁用所有手势:

mapView.getMap().getUiSettings().setAllGesturesEnabled(false);

仅禁用缩放:

mapView.getMap().getUiSettings().setZoomControlsEnabled(false);

【讨论】:

    【解决方案2】:
           mapView = (MapView) findViewById(R.id.mapview);
           mapView.setBuiltInZoomControls(false);
    

    【讨论】:

    • 这对 API lvl 8 没有帮助(我猜它根本没有帮助?)用户仍然可以缩放 mapView。只有在 MapView 中将 clickable 设置为 false 才能完成这项工作,但这会阻止任何点击/点击识别,因为它看起来...
    猜你喜欢
    • 2014-01-12
    • 1970-01-01
    • 2012-01-04
    • 1970-01-01
    • 2011-09-06
    • 1970-01-01
    • 1970-01-01
    • 2017-10-28
    • 1970-01-01
    相关资源
    最近更新 更多