谷歌地图:检索附近地铁站的经纬度? [英] Google Maps: Retrieve nearby subway station's latitude and longtitude?

查看:121
本文介绍了谷歌地图:检索附近地铁站的经纬度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当浏览纽约的谷歌地图时,我们可以看到许多地铁站。我怎样才能得到附近的地铁站的数据?例如,我发送一个请求包含我的位置的经纬度和一个半径的距离,它会返回给定距离内的地铁站点。$ / b>

b $ b

解决方案

您可以使用 Places Library 。通过向请求中提供类型。您可以在这里查看支持的类型

  var request = {
位置:pyrmont,
半径:'500',
类型:['subway_station','train_station']
};

尽管我不知道如何获得该车站的哪些地铁线路。


When viewing google maps for New York, We can see many metro stations. How can I get nearby Metro station's data?

For example, I send a request contain the latitude and longtitude of my location and a radius of distance, it would return subway station within the given distance

解决方案

You can use the Places Library for this. By feeding in the type into the request. You can view the supported types here

var request = {
  location: pyrmont,
  radius: '500',
  types: ['subway_station', 'train_station']
};

Although I dunno how to get which metro lines are available at the station.

这篇关于谷歌地图:检索附近地铁站的经纬度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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