Repository navigation
google_maps is not drawing customized Polyline on iOS #60083
Copy link
Copy link
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listfound in release: 1.22Found to occur in 1.22Found to occur in 1.22found in release: 1.26Found to occur in 1.26Found to occur in 1.26found in release: 2.0Found to occur in 2.0Found to occur in 2.0found in release: 2.3Found to occur in 2.3Found to occur in 2.3has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: mapsGoogle Maps pluginGoogle Maps pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-iosiOS applications specificallyiOS applications specificallyteam-iosOwned by iOS platform teamOwned by iOS platform teamtriaged-iosTriaged by iOS platform teamTriaged by iOS platform team
Description
I'm using the following style of Polyline to draw one the google_maps
Polyline(
polylineId: PolylineId("${polylineId++}"),
width: 4,
points: points,
patterns: isWalking
? path
.map(
(_) => PatternItem.dot,
)
.toList()
: [],
color: ColorRes.colorSecondaryLight,
jointType: JointType.round,
startCap: Cap.roundCap,
endCap: Cap.roundCap,
)
The Polyline appears normal on Android, but it uses the default style on iOS (like I didn't use any styling)
It draws the Polyline, just not using any customizations.
Flutter Doctor :
flutter doctor -v
[✓] Flutter (Channel stable, v1.17.4, on Mac OS X 10.15.4 19E287, locale en-SY)
• Flutter version 1.17.4 at /Users/ucgmacmini/Library/flutter
• Framework revision 1ad9baa8b9 (6 days ago), 2020-06-17 14:41:16 -0700
• Engine revision ee76268252
• Dart version 2.8.4
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.0-rc1)
• Android SDK at /Users/ucgmacmini/Library/Android/sdk
• Platform android-30, build-tools 30.0.0-rc1
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.3.1, Build version 11C505
• CocoaPods version 1.9.1
[✓] Android Studio (version 4.0)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 46.0.2
• Dart plugin version 193.7361
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
[!] IntelliJ IDEA Community Edition (version 2020.1.2)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
• For information about installing plugins, see
https://flutter.dev/intellij-setup/#installing-the-plugins
[!] VS Code (version 1.45.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
✗ Flutter extension not installed; install from
https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[✓] Connected device (2 available)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 10 (API 29) (emulator)
• iPhone 11 Pro • 7CF0AEC0-6B2F-4EDA-9C70-5941AE459EED • ios • com.apple.CoreSimulator.SimRuntime.iOS-13-3 (simulator)
! Doctor found issues in 2 categories.I've tested on an Emulator and on a Physical Device
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listfound in release: 1.22Found to occur in 1.22Found to occur in 1.22found in release: 1.26Found to occur in 1.26Found to occur in 1.26found in release: 2.0Found to occur in 2.0Found to occur in 2.0found in release: 2.3Found to occur in 2.3Found to occur in 2.3has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: mapsGoogle Maps pluginGoogle Maps pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-iosiOS applications specificallyiOS applications specificallyteam-iosOwned by iOS platform teamOwned by iOS platform teamtriaged-iosTriaged by iOS platform teamTriaged by iOS platform team
Activity
iapicca commentedon Jun 24, 2020
I’m unable to reproduce the issue to pinpoint the cause, but there are reports from several users.
The issue needs further investigation.
vanlooverenkoen commentedon Jun 24, 2020
@iapicca
I have the problem with this code
Hixie commentedon Jun 30, 2020
@vanlooverenkoen Can you submit a
pubspec.yamlandlib/main.dartwhich, when placed into theflutter createtemplate, reproduces this bug?vanlooverenkoen commentedon Jul 15, 2020
@Hixie
My App:
My Pubspec:
vanlooverenkoen commentedon Jul 21, 2020
@Hixie i have added the example but waiting on customer is still added to this ticket
no-response commentedon Jul 24, 2020
Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away!
Thanks for your contribution.
47 remaining items
[google_maps_flutter] Implement polyline patterns in google maps ios (#…
[google_maps_flutter] Implement polyline patterns in google maps ios (f…
Colman commentedon May 29, 2024
After the fix in;
It still seems like the following pattern doesn't display:
Build targeting iOS 14, running on iOS 17.5.1. Same result when targeting iOS 15, running on iOS 17.5.1.
Hari-07 commentedon Jun 7, 2024
@Colman
Currently the Polyline pattern just does dash and solid. From what I could see, dots were done in a completely different way in the ios SDK (Stamp Style). It's not consistent between android and ios, so at the moment dot will not work on ios.
https://developers.google.com/maps/documentation/ios-sdk/shapes#add-a-repeating-color-pattern-to-a-polyline
markokosticdev commentedon Jul 30, 2024
startCapandendCapdont work at all on iOS, so I am not able to usestartCap: Cap.roundCapand endCap:Cap.customCapFromBitmap(bitmap)GiuseppeMaffiaAlten commentedon Feb 7, 2025
radikris commentedon Mar 14, 2025
[google_maps_flutter] Implement polyline patterns in google maps ios …
frapeti commentedon Jun 17, 2025
stuartmorgan-g commentedon Sep 12, 2025
Closing, as this was supposed to be closed by flutter/packages#5757 but the PR didn't have quite the right annotation to auto-close. Please file new issues for any specific follow-up (e.g., dots).
github-actions commentedon Sep 26, 2025
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.