如何使用离散地址组件查询 Google 地图的方向?
我想构建一个用于行车路线的 Google 地图查询,但我的应用程序的代码结构需要单独的字段。也就是说,我不能说
?saddr=100+Main+St,Anytown,PA,02154
相反,我需要说
?saddr=100+Main+St&scity=Anytown&sstate=PA&szip=02154
我可以更改查询字符串参数的名称,但我不能省略它们。
有人知道谷歌会接受什么吗?
I want to build a Google Maps query for driving directions, but the code structure of my application requires separate fields. That is, I can't say
?saddr=100+Main+St,Anytown,PA,02154
Instead I need to say
?saddr=100+Main+St&scity=Anytown&sstate=PA&szip=02154
I can change the names of the querystring parameters, but I can't omit them.
Anybody know what Google will accept?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Google 地图将忽略它无法识别的参数,因此您可以在
saddr
中创建地址并发送其他参数。Google maps will ignore the parameters it doesn't recognize so you can create the address in
saddr
and send the other parameters too.