我正在尝试在导航 UI 上放置一些航点,但我遇到了标题问题,这是我的代码,在 foreach 中我遇到了问题。好像我没有导入什么东西
Point[] waypoints = {Point.fromLngLat(2.444740599999932, 41.5381124),Point.fromLngLat(2.407215469098446, 41.520481047202615};
@Override
public void onNavigationReady() {
NavigationViewOptions.Builder options = NavigationViewOptions.builder();
options.navigationListener(this);
options.origin(origin);
options.destination(destination);
options.shouldSimulateRoute(true);
options.progressChangeListener(this);
for (Point waypoint : waypoints) {
options.addWaypoint(waypoint);
}
navigationView.startNavigation(options.build());
}