3

I wanted to have a map having directions set to a static destination.

From what i saw, i gave a link as follows:

<a href="https://www.google.com/maps?saddr=My+Location&daddr=760+West+Genesee+Street+Syracuse+NY+13204" target="_blank">link</a>

Which opens up a new page with the map.

I haven't been able to replicate this on mobile (Android/Ios) however. Following error comes up on the mobile: "No Routes Found" .

Can you explain me what am doing wrong?

PS: Am currently using this on a responsive website adding it as a link. I don't want this embedded either.

Thanks.

Nevin Madhukar K
  • 3,031
  • 2
  • 25
  • 52

3 Answers3

3

Try changing the URL like the below one. It might help you.

http://maps.google.com/maps?saddr=Current+Location&daddr=Kochi+Kerala+India

Thanks

Rahmathullah M
  • 2,676
  • 2
  • 27
  • 44
0

The query string format is an older format, so maybe this newer syntax might work:

<a href="https://www.google.com/maps/dir/Current+Location/760+West+Genesee+Street+Syracuse+NY+13204" target="_blank">link</a>

I've found that sometimes Google likes different phrasings for the current location, so if that doesn't work, you could also try something like Your+Location.

GreatBlakes
  • 3,971
  • 4
  • 20
  • 28
0

I cannot not use coordinates as source address because I send out a link in an email and my clients can be anywhere in the city when they read it.

For me neither of "My+Location" nor "Current+Location" worked. It always set the source address to the official center coordinates of the current city or the official address of the internet provider. Both on mobile or in desktop browser. Christian explained here why: https://stackoverflow.com/a/59249673/5356216

The recommended and working solution in 2022 which is language independent is this:

https://www.google.com/maps/dir/?api=1&destination=760+West+Genesee+Street+Syracuse+NY+13204
Zoltán Süle
  • 1,482
  • 19
  • 26