得到谷歌地图的路线和方向,而不使用Javascript? [英] Get routes and directions from Google Maps without using Javascript?

查看:144
本文介绍了得到谷歌地图的路线和方向,而不使用Javascript?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,如果你是书面方式 - 而不是一个网站 - 一个应用程序,你需要从一个地方到另一个,你怎么可以从谷歌地图的信息,而无需使用Javascript解决的方向?

So, if you are writting an application -not a website- and you need to resolve the directions from one location to another, how can you get the information from Google Maps without using Javascript?

我想知道如果有任何一组给定的一对位置(双城市名)在谷歌地图的特殊URL或原料药将返回路线坐标,使得从城市A到城市B的路由路径。

I am wondering if there's any set of special URL or APIs on Google Maps that given a pair of locations (two city names) would return the route coordinates that makes the path of the route from city A to city B.

推荐答案

好吧,javascript中发出一个HTTP请求和接收回JSON响应的GMaps实现。看看请求的格式和你自己做出这样的请求。

Well, the GMaps javascript sends out a HTTP request and receives back a JSON response. See what the format of the request is and make such requests yourself.

不知道有关XML路径,但你可以很容易的JSON转换为XML - 毕竟,都是树形结构

Not sure about a XML path, but you could convert the JSON to XML easily - after all, both are tree structures.

编辑:虽然上述在技术上是可能的,这可能会或可能不会被允许;你可能不应该想打破的ToS。

Although the above is technically possible, this may or may not be allowed; you probably shouldn't want to break the ToS.

这篇关于得到谷歌地图的路线和方向,而不使用Javascript?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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