Google Maps: Retrieve nearby subway station's latitude and longitude?

后端 未结 2 1375
攒了一身酷
攒了一身酷 2021-01-13 14:13

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 latitud

相关标签:
2条回答
  • 2021-01-13 14:21

    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.

    0 讨论(0)
  • 2021-01-13 14:36

    You should use the Google Places API to query for this data. Lat/Lon and radius are both parameters to this API and you can specify a text search like "Subway"

    0 讨论(0)
提交回复
热议问题