【发布时间】:2020-12-04 19:45:37
【问题描述】:
此 Mapbox 代码现已弃用:
mapboxMap.setOnMarkerClickListener(new MapboxMap.OnMarkerClickListener() {
@Override
public boolean onMarkerClick(@NonNull Marker marker) {
// Show a toast with the title of the selected marker
Utilities.makeToast(requireContext(), marker.getTitle());
return true; // Prevents standard InfoWindow from being displayed
}
});
documentation 表示改用Mapbox Annotation Plugin。我已阅读该内容并查看了MarkerView example,但没有任何关于如何检测何时单击标记 (MarkerView) 的线索。
此外,MarkerViewManager 和 MarkerView 类似乎没有任何可用于检测标记点击的方法。
有什么想法吗?
【问题讨论】:
标签: android mapbox-android mapbox-marker