我正在尝试使用启动器sdk从heremaps sdk获取路线航点。
Mycode如下
rm.calculateRoute(routePlan, new RouteManager.Listener() {
@Override
public void onProgress(int i) {
Toast.makeText(MainActivity.this, "calculating route"+i, Toast.LENGTH_SHORT).show();
}
@Override
public void onCalculateRouteFinished(RouteManager.Error error, List<RouteResult> list) {
Toast.makeText(MainActivity.this, "cant calculate route [SEPEP]: " + error.name(), Toast.LENGTH_LONG).show();
if (error == RouteManager.Error.NONE) {
// Render the route on the map
MapRoute mapRoute = new MapRoute(list.get(0).getRoute());
map.addMapObject(mapRoute);
} else {
// Toast.makeText(MainActivity.this, "cant calculate route [SEPEP]: " + error.name(), Toast.LENGTH_LONG).show();
}
}
});
我在这里一直遵循,但是它返回INVALID_OPERATION错误。
完整代码在这里 https://developer.here.com/documentation/android-starter/dev_guide/topics/routing-starter.html