有没有办法将参数传递给谷歌地图的获取路线功能? [英] is there a way to pass arguments to google map's get directions functionality?

查看:155
本文介绍了有没有办法将参数传递给谷歌地图的获取路线功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法使用maps.google.com的get direction的功能,以便我可以通过url的路线参数传递参数?

解决方案

您可以使用以下url参数。

saddr 开始地址



daddr 目的地址



网址为 http://maps.google.com/maps?saddr=new+york&daddr=baltimore

您传入的值几乎可以是任何可以输入到Web应用程序中的值,即地名/ lat longs / etc的名称。此外,请确保您为空格使用 + 字符。


Is there a way to use maps.google.com's get direction's functionality so that I can pass in the arguments for the directions from the url?

解决方案

You can use the following url parameters.

saddr for start address

daddr for destination address

The url would be http://maps.google.com/maps?saddr=new+york&daddr=baltimore

The values you pass in can be pretty much whatever you can type into the web app, ie names of places/lat longs/etc. Also, make sure you use a + character for spaces.

这篇关于有没有办法将参数传递给谷歌地图的获取路线功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆