Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IOS][Google Map] showDirections is not showing the route screen #188

Open
HasanAlqaisi opened this issue Aug 29, 2024 · 5 comments
Open

Comments

@HasanAlqaisi
Copy link

Hello,
When using showDirections with waypoints:

      await MapLauncher.showDirections(
        mapType: map,
        destination: Coords(
          coords.latitude,
          coords.longitude,
        ),
        waypoints: waypoints
                ?.mapIndexed(
                  (index, item) => Waypoint(
                    item.latitude,
                    item.longitude,
                    'Location ${index + 1}',
                  ),
                )
                .toList() ??
            [],
      );

The route is not showing directly on IOS, instead this screen will be showing:
Screenshot 2024-08-29 at 1 19 11 PM

However, on Android it will show the directions screen directly:
Screenshot 2024-08-29 at 1 22 10 PM

I am not sure why it behaves different on IOS.

@mattermoran
Copy link
Owner

it's just how it works on google maps for ios. nothing I can do about it.

let me know if you think there's a way to show something else, otherwise I'm closing this for now

@mattermoran mattermoran closed this as not planned Won't fix, can't repro, duplicate, stale Sep 29, 2024
@HasanAlqaisi
Copy link
Author

it's just how it works on google maps for ios. nothing I can do about it.

let me know if you think there's a way to show something else, otherwise I'm closing this for now

I've found a way by using a different url. But I am not sure if it fits all the cases.
Here's a fork if you would like to check.
I couldn't find comprehensive information on this topic in the Google Maps documentation, so I found it through a search at that time.

@mattermoran
Copy link
Owner

hmm interesting. so this one works as expected you say? I would prefer not to use undocumented apis as that could just stop working at any point without notice but def something to investigate. will reopen for now

@mattermoran mattermoran reopened this Sep 29, 2024
@HasanAlqaisi
Copy link
Author

hmm interesting. so this one works as expected you say? I would prefer not to use undocumented apis as that could just stop working at any point without notice but def something to investigate. will reopen for now

Yeah I've used it in a project and it was showing the map the same as Android.
But I haven't tested it enough, also maybe it is documented somewhere because I came across this method through multiple Stack Overflow questions.

@Stcstcdpidpi
Copy link

Good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants