We rolled out a new and better SDK for you.

Route alternatives

Allow your users to check different routing alternatives so they can choose the one they prefer.

Sample use case: You are preparing a road trip and would like to see different route options to choose one that is both optimal for your trip and suits your road trip preferences.

In the following example you can see an implementation of alternative routes using a clickable route object. Click the route to get its ETA and the distance between its origin and destination.

1let mapRoute = TTMapRoute(coordinatesData: planedRoute,
2 with: TTMapRouteStyle.defaultActive(),
3 imageStart: TTMapRoute.defaultImageDeparture(),
4 imageEnd: TTMapRoute.defaultImageDestination())
6mapRoute.extraData = planedRoute.summary
1TTMapRoute *mapRoute = [TTMapRoute routeWithCoordinatesData:planedRoute withRouteStyle:TTMapRouteStyle.defaultActiveStyle imageStart:TTMapRoute.defaultImageDeparture imageEnd:TTMapRoute.defaultImageDestination]
2[self.mapView.routeManager addRoute:mapRoute];
3mapRoute.extraData = planedRoute.summary;


One alternative


Five alternatives