导航图标在此期间通过转弯导航在此处丢失了SDK

发布于 2025-02-13 22:36:48 字数 218 浏览 0 评论 0 原文

打开应用程序时,有时将显示指针,有时不会显示。 在显示指针的情况下,当我们导航到另一个屏幕(活动/片段)并返回地图屏幕时,指针将消失。在logcat中没有错误的错误

此处使用的SDK-Heresdk-navigate-android-4.9.4.0.7265

When the application is opened, sometimes the pointer will be displayed and sometimes not.
In the case where a pointer is displayed , when we navigate to another screen (Activity/Fragment) and come back to the Map screen, the pointer will disappear. No error is traced in logcat

Here SDK used - heresdk-navigate-android-4.9.4.0.7265Navigation Pointer (Arrow) missing in turn by turn navigation

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

紫瑟鸿黎 2025-02-20 22:36:48

切换MapViews时,请确保恢复它们。另外,您需要自己添加/删除/删除 location indicator 。在导航期间,您可以交换 mapView 实例(如果需要):

public void swapMapView(MapView newMapView) {
    if (isVisualNavigatorRenderingStarted) {
        visualNavigator.stopRendering();
        mapView = newMapView;
        customLocationIndicator.enable(mapView);
        customLocationIndicator.setLocationIndicatorStyle(LocationIndicator.IndicatorStyle.NAVIGATION);
        visualNavigator.setCustomLocationIndicator(customLocationIndicator);
        visualNavigator.startRendering(mapView);
    } else {
        this.mapView = newMapView;
    }
}

请确保将指示器设置为 visualnavigator

有一个示例应用程序显示如何使用自定义位置指标:
https://github.com/heremaps/here-sdk-examples/tree/master/master/examples/latest/navigate/anvigate/android/navigationcustom

When you switch MapViews, make sure to resume them. Also, you need to add/remove the LocationIndicator yourself. During navigation you can swap the MapView instance (if needed):

public void swapMapView(MapView newMapView) {
    if (isVisualNavigatorRenderingStarted) {
        visualNavigator.stopRendering();
        mapView = newMapView;
        customLocationIndicator.enable(mapView);
        customLocationIndicator.setLocationIndicatorStyle(LocationIndicator.IndicatorStyle.NAVIGATION);
        visualNavigator.setCustomLocationIndicator(customLocationIndicator);
        visualNavigator.startRendering(mapView);
    } else {
        this.mapView = newMapView;
    }
}

Make sure to set the indicator also to the VisualNavigator.

There is an example app that shows how to use custom location indicators:
https://github.com/heremaps/here-sdk-examples/tree/master/examples/latest/navigate/android/NavigationCustom

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文