heremaps / here-ios-sdk-examples

Objective-C and Swift projects using the HERE SDK for iOS.
MIT License
60 stars 55 forks source link

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

Open vishalparmar22091989 opened 2 years ago

vishalparmar22091989 commented 2 years ago

// 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 commented 2 years ago

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

dashchak commented 2 years ago

@LeOric32 Please take a look

vishalparmar22091989 commented 2 years ago

@dashchak @LeOric32 Any update ?

LeOric32 commented 2 years ago

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

vishalparmar22091989 commented 2 years ago

@LeOric32 I want to add the following things

So one array-like

[startpoint, multiple waypoints, destinationpoint]

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

vishalparmar22091989 commented 2 years ago

@LeOric32 Any suggestion for that

vishalparmar22091989 commented 2 years ago

@LeOric32 @dashchak Any update?

vishalparmar22091989 commented 2 years ago

@dashchak @LeOric32 Any Update ?

vishalparmar22091989 commented 2 years ago

@dashchak @LeOric32 Any solutions?