【问题标题】:How do I disable gestures in Mapbox v10.0?如何在 Mapbox v10.0 中禁用手势?
【发布时间】:2021-11-21 08:39:13
【问题描述】:

该指南提到禁用 Kotlin here 的用户交互。

mapView = findViewById(R.id.mapView)
mapboxMap = mapView.getMapboxMap()
mapboxMap.gestures();  //Method not found??

我不知道如何在 Kotlin 中编写代码。我无法解决它来使用 Java。在 Java 中,它说它无法解析符号“手势”。 其他功能也有同样的问题。

【问题讨论】:

    标签: java android mapbox mapbox-android


    【解决方案1】:

    你需要获取 GesturesPlugin 的引用,试试这个:

    final  GesturesPlugin gesturesPlugin = GesturesUtils.getGestures((mapView));
            gesturesPlugin.setPitchEnabled(false);
            gesturesPlugin.setScrollEnabled(false);
        }
    

    【讨论】:

    • 你能告诉我如何添加标记吗?
    猜你喜欢
    • 2011-06-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-10-22
    • 1970-01-01
    • 2014-04-01
    相关资源
    最近更新 更多