Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/google-maps/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 如何在新的谷歌地图链接URL中控制我的方向类型首选项?_Android_Google Maps - Fatal编程技术网

Android 如何在新的谷歌地图链接URL中控制我的方向类型首选项?

Android 如何在新的谷歌地图链接URL中控制我的方向类型首选项?,android,google-maps,Android,Google Maps,我希望能够有一个谷歌地图方向链接,当它在移动(Android)上打开时,将使用指定的方向类型(如自行车)在谷歌地图中显示方向 使用旧的谷歌地图URL参数 https://www.google.com/maps/preview?saddr=[insert_from_address_here]&daddr=[insert_to_address_here]&dirflg=[insert_mode_here] https://www.google.com/maps/dir/[custo

我希望能够有一个谷歌地图方向链接,当它在移动(Android)上打开时,将使用指定的方向类型(如自行车)在谷歌地图中显示方向

使用旧的谷歌地图URL参数

https://www.google.com/maps/preview?saddr=[insert_from_address_here]&daddr=[insert_to_address_here]&dirflg=[insert_mode_here]
https://www.google.com/maps/dir/[customer address]/[our address]/am=t/
但它在手机上不起作用

使用新的谷歌地图URL参数

https://www.google.com/maps/preview?saddr=[insert_from_address_here]&daddr=[insert_to_address_here]&dirflg=[insert_mode_here]
https://www.google.com/maps/dir/[customer address]/[our address]/am=t/
这在手机上确实有效,但我不知道如何指定方向类型。

如果有效,请在您的URL上尝试

Car /data=!4m2!4m1!3e0
Bicycling /data=!4m2!4m1!3e1
Walking /data=!4m2!4m1!3e2
Public Transit /data=!4m2!4m1!3e3
Airplane /data=!4m2!4m1!3e4
比如说

https://www.google.com/maps/dir/747+Howard+St,+San+Francisco,+CA/55+Music+Concourse+Dr,+San+Francisco,+CA/data=!4m2!4m1!3e3
有关更多信息,请查看上面的链接和此问题