0

我正在集成 Here's Premium SDK for Android 来对计算出的路线进行导航测试。我有以下问题,希望有人可以帮助我。我从地图配置路线行程并计算路线很好,但是当我在此地图中开始导航此计算路线时,出现以下错误:NavigationManager.Error.OPERATION_NOT_ALLOWED

代码如下:

override fun startNavigationForRouteInMap(
        route: Route,
        map: com.here.android.mpa.mapping.Map,
        voiceSkinSelected: VoiceSkin?) {

        navigationManager.apply {
            setMap(map)
            voiceGuidanceOptions.voiceSkin = voiceSkinSelected
            /*
             * Set the map update mode to ROADVIEW.This will enable the automatic map movement based on
             * the current location.If user gestures are expected during the navigation, it's
             * recommended to set the map update mode to NONE first. Other supported update mode can be
             * found in HERE Android SDK API doc
            */
            mapUpdateMode = NavigationManager.MapUpdateMode.ROADVIEW
            addNavigationManagerEventListener(
                WeakReference<NavigationManager.NavigationManagerEventListener>(
                    navigationManagerEventListener)
            )
            addPositionListener(
                WeakReference<NavigationManager.PositionListener>(positionListener))
            addManeuverEventListener(
                WeakReference<NavigationManager.ManeuverEventListener>(routeManeuverEventListener))

        }

        val result = navigationManager.simulate(route, 60)

        if(result == NavigationManager.Error.NONE)
            navigationListener?.onNavigationStarted(route)
        else {
            Log.d("NAVIGATION", "Error name -> ${result.name}")
            navigationListener?.onNavigationError()
        }

为什么会出现这个错误?我已经配置了正确的 api 密钥和许可证密钥。

谢谢。

4

1 回答 1

0

您的 licensekey 可能未启用 BICYCLE 导航,您需要联系您的 HERE 销售联系人以启用此功能。如果您没有销售联系人,请使用HERE 开发人员门户上提供的表格。

于 2020-01-16T14:09:08.300 回答