android - 斯科布勒 Android : How can I get all points to simulated route?

标签 android skmaps

我需要获得模拟路线的很多点。我的目标是让所有点在另一个 View 中使用 SKPolyline 的形状绘制路线。我怎样才能得到它?

问候。

最佳答案

如果我理解你的目标,你想绘制 skobbler 使用 SKPolyline 为你计算的路线。

请求路由计算后,回调 onRouteCalculationCompleted 将使用 SKRouteInfo 进行调用。

要获取路线位置,请尝试:

        List<SKExtendedRoutePosition> list = SKRouteManager.getInstance().getExtendedRoutePointsForRoute(skRouteInfo.getRouteID());

请求路线计算时,不要忘记设置 ExtendedPointsReturned=true。

SKRouteSettings routeS = new SKRouteSettings();
    routeS.setStartCoordinate(startPosition.getCoordinate());
    routeS.setDestinationCoordinate(destinationPosition.getCoordinate());
    // number of alternative routes specified here
    routeS.setNoOfRoutes(1);
    routeS.setRouteMode(SKRouteSettings.SKRouteMode.CAR_FASTEST);
    //set true if you want the route is draw on map
    routeS.setRouteExposed();
    routeS.setExtendedPointsReturned(true);
    SKRouteManager.getInstance().calculateRoute(routeS);

关于android - 斯科布勒 Android : How can I get all points to simulated route?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35922114/

相关文章:

android - 当设备连接到您的 android wifi 网络共享 AP 时如何获得通知?

android - Skobbler 获得环岛导出

ios - 更改 Skobblers SKMaps for iOS 中的路线宽度

iOS - SKReverseGeocoderService reverseGeocoding 给出了不详细的一般结果

Android - 如何使用 Camera2 库将相机流传递给 ffmpeg?

Android html5 输入类型 ="password"和数字键盘

android - Skobbler API中的Annotation.setOffset()是什么单位

android - SKMAPS 导航监听器中未调用 OnDestinationReached

android - 如何在 Android 中创建计时器滴答声?

java - Mosby 框架 - getView 导致 ClassCastException