here-ios-sdk-examples icon indicating copy to clipboard operation
here-ios-sdk-examples copied to clipboard

How i add array in dynamic manner NMAWAYPOINT and NMAGeoCoordinates *start/end.

Open vishalparmar22091989 opened this issue 3 years ago • 9 comments

// setup waypoints NMAGeoCoordinates *start = [[NMAGeoCoordinates alloc] initWithLatitude:49.839882 longitude:24.029239]; NMAGeoCoordinates *end = [[NMAGeoCoordinates alloc] initWithLatitude:49.849897 longitude:24.022307]; NMAWaypoint *startWaypoint = [[NMAWaypoint alloc] initWithGeoCoordinates:start]; NMAWaypoint *endWaypoint = [[NMAWaypoint alloc] initWithGeoCoordinates:end];

// setup mode NMARoutingMode *mode = [[NMARoutingMode alloc] initWithRoutingType:NMARoutingTypeFastest transportMode:NMATransportModeCar routingOptions:0]; // calculate a route _router = [[NMACoreRouter alloc] init]; [_router calculateRouteWithStops:@[startWaypoint, endWaypoint] routingMode:mode completionBlock:^(NMARouteResult *result, NMARoutingError error) { if (error == NMARoutingErrorNone && result.routes.count > 0) { // distance in meters NSUInteger distance = [result.routes firstObject].length; } }];

Hello sir I want to pass a single array with a waypoint and NMAGeoCoordinates in following. let me know if ypu have any idea. i don't have any limit for waypoint so I can not put it static.

[_router calculateRouteWithStops:@[startWaypoint, endWaypoint]

vishalparmar22091989 avatar Nov 01 '21 11:11 vishalparmar22091989

@dashchak try to the possible answer as ASAP. Thanks in Advance

vishalparmar22091989 avatar Nov 01 '21 11:11 vishalparmar22091989

@LeOric32 Please take a look

dashchak avatar Nov 01 '21 13:11 dashchak

@dashchak @LeOric32 Any update ?

vishalparmar22091989 avatar Nov 11 '21 06:11 vishalparmar22091989

@vishalparmar22091989 Hi! Can you provide more info? Do you want to add waypoints in stops array and change your route dynamically?

LeOric32 avatar Nov 15 '21 13:11 LeOric32

@LeOric32 I want to add the following things

  • one origin and one destination
  • And multiple waypoints

So one array-like

[startpoint, multiple waypoints, destinationpoint]

i want to make dynamically all things How i make this array?

vishalparmar22091989 avatar Nov 16 '21 11:11 vishalparmar22091989

@LeOric32 Any suggestion for that

vishalparmar22091989 avatar Nov 18 '21 12:11 vishalparmar22091989

@LeOric32 @dashchak Any update?

vishalparmar22091989 avatar Nov 19 '21 08:11 vishalparmar22091989

@dashchak @LeOric32 Any Update ?

vishalparmar22091989 avatar Dec 01 '21 10:12 vishalparmar22091989

@dashchak @LeOric32 Any solutions?

vishalparmar22091989 avatar Dec 07 '21 13:12 vishalparmar22091989