mapbox / mapbox/mapbox-maps-flutter
How to draw polylines from US to Asia across the Pacific
Nobody has claimed this yet.
- Dominant language
- Dart
- Stars
- 380
- Forks
- 204
- PR merge metrics
- No merged PRs in 30d
Description
Trying to draw a polyline from from the US to Asia across the Pacific Ocean, problem is when the line hits edge of the map it draws horizontally across the entire map to the opposite edge before continuing on the path.
Im using a polylineAnnotationManager to create multiple lines from a list of points:
breadcrumbPolylineAnnotationManager!
.createMulti(validBreadcrumbs.map((crumb) {
return map.PolylineAnnotationOptions(
geometry: map.LineString.fromPoints(
points: crumb.convertPolylineListToMapboxPoints(),
),
lineColor: crumb.getPolylineColor().value,
lineWidth: 5.0,
);
}).toList());
here is the points that correspond to the transition from from negative to positive longitudes
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the polylineAnnotationManager usage and the longitude-transition points shown in the issue. Investigate how the map renders LineString coordinates when a path crosses from negative to positive longitudes; done means the US-to-Asia line follows the Pacific route without a horizontal segment across the map.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, flutter
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100