/**
* Provide a list of {@link DirectionsRoute}s, the primary route will default to the first route
* in the directions route list. All other routes in the list will be drawn on the map using the
* alternative route style.
*
* @param directionsRoutes a list of direction routes, first one being the primary and the rest of
* the routes are considered alternatives.
* @since 0.8.0
*/
public void addRoutes(@NonNull @Size(min = 1) List<DirectionsRoute> directionsRoutes) {
this.directionsRoutes = directionsRoutes;
primaryRouteIndex = 0;
if (!layerIds.isEmpty()) {
for (String id : layerIds) {
mapboxMap.removeLayer(id);
}
}
featureCollections.clear();
generateFeatureCollectionList(directionsRoutes);
drawRoutes();
addDirectionWaypoints();
}
NavigationMapRoute.java 文件源码
java
阅读 34
收藏 0
点赞 0
评论 0
项目:mapbox-navigation-android
作者:
评论列表
文章目录