We are converting Android Project Here Map Android Starter SDK to Lite Edition. I want to display the multiple waypoints on route.
For Starter SDK we are using the RoutePlan for plotting the multiple waypoints. but in Lite Edition i am unable to find the RoutePlan. For more information find the below Android Starter SDK Code snippets:
val routePlan = RoutePlan()
val routeOptions = RouteOptions()
routeOptions.transportMode = RouteOptions.TransportMode.CAR
routeOptions.routeType = RouteOptions.Type.FASTEST
routePlan.routeOptions = routeOptions
for (routeLatLang in tripRouteData) {
try {
routePlan.addWaypoint(GeoCoordinate(lat.toDouble(), longg.toDouble()))
} catch (e: Exception) {
e.printStackTrace()
}
}
val error = routeManager.calculateRoute(routePlan, routeManagerListener)
if (error != RouteManager.Error.NONE) {
Toast.makeText(activity,
"Route calculation failed with: " + error.toString(), Toast.LENGTH_SHORT)
.show()
}
Also find the below code snippets of Lite Edition SDK :
val waypoint1 = Waypoint(latitude1,longitude1)
val waypoint2 = Waypoint(latitude2,longitude2)
val waypoints = java.util.ArrayList(Arrays.asList(Waypoint(startGeoCoordinates),
waypoint1, waypoint2, Waypoint(destinationGeoCoordinates)))
So, How we can plot the multiple waypoints on Here Map Lite Edition, Also what is limit of maximum waypoints to plot on route.