How can I implement multiple routes using the iOS HereMap
SDK.
Can anyone provide the Example for the Multiple routes.
Asked
Active
Viewed 306 times
-1

user229044
- 232,980
- 40
- 330
- 338
-
How many routes you want? – Mandeep Singh Feb 24 '20 at 05:53
-
3 routes if available – SaiKrishna Pulaparthi Feb 24 '20 at 06:09
-
By this example I'm able to create one route https://github.com/heremaps/here-ios-sdk-examples/blob/master/routing-ios-swift/RoutingApp/MapViewController.swift – SaiKrishna Pulaparthi Feb 24 '20 at 06:10
1 Answers
1
In the Lite Variant (4.x) of the SDK, set alternativeRoutes in the Route options: https://developer.here.com/documentation/ios-sdk/api_reference/Structs/RouteOptions.html
In the Premium SDK (3.x), set alternatives routes in the NMAroutingMode, and it's called a bit differently there: ResultLimit See https://developer.here.com/documentation/ios-premium/api_reference_jazzy/Classes/NMARoutingMode.html#%2Fc:objc(cs)NMARoutingMode(py)resultLimit

Marco
- 2,190
- 15
- 22
-
Still unclear which product/variant/version you are using, but your example above with one route should be easy to adapt. Just set the alternative routes to 1 or higher (max. 9), and route result (what is anyway already an array) will contain the routes, if available. – Marco Feb 24 '20 at 10:35