Dammyololade / flutter_polyline_points

A flutter plugin that's decodes encoded google poly line string into list of geo-coordinates suitable for showing route/polyline on maps
MIT License
109 stars 132 forks source link

Cannot apply patterns, startCap or endCap on iOS #30

Closed thomaaam closed 4 years ago

thomaaam commented 4 years ago

I have had issues with this package on iOS since I started using it some months ago. More specifically the issue is that applying pattern or cap styles does not change anything on iOS, while on Android it works as expected. Thus on Android I see this dotted black line with a defined gap, while on iOS I just see a black line. Here's the code segment for the patterns parameter:

int buffer = 0;
final scale = MediaQuery.of(context).devicePixelRatio;
final gap = PatternItem.gap(scale * 6);
Polyline(...,
patterns: polylineCoordinates
   .map((pl) => buffer++ % 2 == 0 ? PatternItem.dot : gap)
   .toList(), ...);

I am quite amazed that no one has addressed this issue here already, as I find it hard to believe I am the only one that experiences it.

Here's the report from flutter doctor:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 1.20.2, on Mac OS X 10.15.6 19G2021, locale en-NO)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.1)
[✓] Xcode - develop for iOS and macOS (Xcode 11.6)
[✓] Android Studio (version 4.0)
[✓] Connected device (1 available)

• No issues found!

The designer is now saying that he thinks it looks so bad without the pattern style, that he'd rather just not have it in the app :( Help is very much appreciated!

thomaaam commented 4 years ago

It seems this issue might not be related to this package, but instead the google_maps_flutter package. The issue has been addressed here: https://github.com/flutter/flutter/issues/60083.

Therefore I'll close this issue as it does not appear to be relevant here.