flutter_mapbox_navigation icon indicating copy to clipboard operation
flutter_mapbox_navigation copied to clipboard

Follow route of predefined route with lat long coordinates

Open basvdijk opened this issue 3 years ago • 1 comments

I there a way to use the navigation on a predefined route with GPS points? I've tried to use waypoints but it limited to a max of 25. A GPX file could contain over 1000 points which create a trail. I am wondering what would be the best approach to navigate and follow such a route.

       var wayPoints = List<WayPoint>();
                            wayPoints.add(_origin);
                            wayPoints.add(_stop1);
                            wayPoints.add(_stop2);
                            wayPoints.add(_stop3);
                            wayPoints.add(_stop4);
                            wayPoints.add(_origin);
                            _controller.buildRoute(wayPoints: wayPoints);

Above works, but with a max of 25

basvdijk avatar Feb 14 '22 20:02 basvdijk

Same problem here

santiracca avatar Apr 02 '22 00:04 santiracca

i need this too want to follow predefined polylines

mrqaidi avatar Dec 09 '22 15:12 mrqaidi

Hi, any update on this? I saw that Mapbox can accept a Route object. You call mapbox api to create the object and pass it here. Wondering if there is a way to pass it from Dart. @eopeter

marcotrumpet avatar Apr 08 '23 11:04 marcotrumpet

@eopeter I just created a PR to handle this https://github.com/eopeter/flutter_mapbox_navigation/pull/213

marcotrumpet avatar Apr 11 '23 15:04 marcotrumpet

When you reach the max and the last WayPoint, can you just add more WayPoints? @marcotrumpet can you reopen the PR?

eopeter avatar May 25 '23 12:05 eopeter

When you reach the max and the last WayPoint, can you just add more WayPoints? @marcotrumpet can you reopen the PR?

you mean the PR to follow predefined route? or the one that is opened now?

marcotrumpet avatar May 25 '23 12:05 marcotrumpet

BTW I removed the PR because, although it's technically possible there are some catches:

  1. not totally sure that generate and store directions is permitted by mapbox (it means for them not to charge for api usage) but to be honest I didn't check
  2. I had issues on Android that was unable to decode large routes json in mapbox SDK

marcotrumpet avatar May 25 '23 13:05 marcotrumpet

Stale issue message

eopeter avatar Jul 25 '23 02:07 eopeter