Google地图:是否检索附近地铁站的经度和纬度? [英] Google Maps: Retrieve nearby subway station's latitude and longitude?

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

问题描述

在查看纽约的Google地图时,我们可以看到许多地铁站.我如何获得附近地铁站的数据?

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 longitude of my location and a radius of distance, it would return subway station within the given distance

推荐答案

您可以使用地方图书馆.通过将type输入到请求中.您可以在此处查看支持的类型

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.

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

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