mapbox / mapbox-maps-flutter

Interactive, thoroughly customizable maps for Flutter powered by Mapbox Maps SDK
https://www.mapbox.com/mobile-maps-sdk
Other
297 stars 122 forks source link

How to draw polylines from US to Asia across the Pacific #759

Open MissingLinkDev opened 4 weeks ago

MissingLinkDev commented 4 weeks ago

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. Screenshot_20241102-175942 Screenshot_20241102-175245

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 image

BrahmamMadala commented 1 week ago

I am also facing the same issue. Is there any fix for this issue