4
votes

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

2
Did my answer help you @cqcn1991 ?Joseph Fitzgerald

2 Answers

3
votes

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.

1
votes

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"