Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
vishalparmar22091989 opened this issue Nov 1, 2021 · 9 comments

Comments

@vishalparmar22091989
Copy link

vishalparmar22091989 commented Nov 1, 2021

// 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
Copy link
Author

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

@dashchak dashchak removed their assignment Nov 1, 2021
@dashchak
Copy link
Contributor

dashchak commented Nov 1, 2021

@LeOric32 Please take a look

@vishalparmar22091989
Copy link
Author

@dashchak @LeOric32 Any update ?

@LeOric32
Copy link
Contributor

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

@vishalparmar22091989
Copy link
Author

vishalparmar22091989 commented Nov 16, 2021

@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
Copy link
Author

@LeOric32 Any suggestion for that

@vishalparmar22091989
Copy link
Author

vishalparmar22091989 commented Nov 19, 2021

@LeOric32 @dashchak Any update?

@vishalparmar22091989
Copy link
Author

@dashchak @LeOric32 Any Update ?

@vishalparmar22091989
Copy link
Author

@dashchak @LeOric32 Any solutions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants