mattermoran / map_launcher

Flutter plugin for launching maps
MIT License
265 stars 125 forks source link

Google Maps doesn't correctly consume waypoints on iOS #66

Closed luckyhandler closed 3 years ago

luckyhandler commented 3 years ago

Problem When passing two waypoints --> no waypoints are used in Google Maps on iOS When passing more than two waypoints --> Google Maps doesn't offer any functionality, I cannot tap into waypoint or interact in any way with Google Maps on iOS

Version map_launcher: ^1.1.3+1

[✓] Flutter (Channel stable, 1.22.6, on macOS 11.2.3 20D91 darwin-x64, locale de-DE)
    • Flutter version 1.22.6 at /[User]/sdks/flutter
    • Framework revision 9b2d32b605 (vor 7 Wochen), 2021-01-22 14:36:39 -0800
    • Engine revision 2f0af37152
    • Dart version 2.10.5

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at [User]/sdks/android
    • Platform android-30, build-tools 30.0.2
    • ANDROID_HOME = [User]/sdks/android
    • Java binary at: /Applications/Android Studio 4.0.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.4)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.4, Build version 12D4e
    • CocoaPods version 1.10.1

[✓] IntelliJ IDEA Community Edition (version 2020.3.2)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin installed
    • Dart plugin version 203.7759

[✓] VS Code (version 1.53.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.20.0

on iOS, I'm calling Google Maps with the following code:

    await map.showDirections(
      destination: Coords(
        destination.latitude,
        destination.longitude,
      ),
      destinationTitle: destination.title ?? '',
      origin: Coords(
        departure.latitude,
        departure.longitude,
      ),
      originTitle: departure.title ?? '',
      waypoints: (waypoints ?? <Coordinates>[])
          .map((e) => Coords(e.latitude, e.longitude))
          .toList(),
      directionsMode: rideType == RideType.passenger
          ? DirectionsMode.walking
          : DirectionsMode.driving,
    );
luckyhandler commented 3 years ago

@mattermoran do you have any idea why this could happen?

mattermoran commented 3 years ago

Sorry, didn't get a chance to look at this. Does the same code work on android though? If yes it must be an ios issue as they both use the same url. I'll try to dedicate some time tomorrow to investigate what's happening and get back to you

luckyhandler commented 3 years ago

Yes, it works on Android

mattermoran commented 3 years ago

@luckyhandler I have just tested on iOS again and it seems to be fine with 2 and 3 waypoints. Could you give me coordinates that were not working for you?

2 waypoints 3 waypoints
IMG_0683 IMG_0684
luckyhandler commented 3 years ago

@mattermoran I checked my code again and found an issue before calling your package. I will close this ticket as my problem was not related to this package