I am using Here map to plot routes in my app. Now I have noticed that different routes were plotted in iOS and web app (javascript) for certain routes despite being given the same parameters. I'm giving the same starting location, destination, and intermediate waypoints.
iOS code
let routingMode = NMARoutingMode.init(
routingType: NMARoutingType.fastest,
transportMode: NMATransportMode.truck,
routingOptions: NMARoutingOption.avoidBoatFerry
)
routingMode.speedProfile = .fast
routingMode.truckType = .truck
return routingMode
JavaScript code
routeRequestParams = {
mode: 'fastest;truck;boatFerry:-1',
speedprofile: 'fast',
truckType: 'truck',
representation: 'navigation',
routeattributes : 'waypoints,summary,shape,legs',
maneuverattributes: 'direction,action',
waypoint0: 'lat1,long1', // Brandenburg Gate
waypoint1: 'lat2,long2' // Friedrichstraße Railway Station
};
Any idea why this is happening?
In general this is expected behavior because of the difference in underlying Map data used by HERE Mobile SDK and HERE Routing API (which is used by Javascript API). If the use case is something like transferring a route in a Back office application (using Javascript API) to the Mobile device, you would follow the approach described in the thread: Backend Calculated Route,Here-API to just show Guidance and route on Map