问题
I want to have users able to search their school and Google Places API return a list of results (School Names along with addresses).
eg. User enters "Springfield Elementary" and the Places API gives the top results for that. Is that possible at all?
And also without knowing the user's location?
回答1:
You can have a look at the Places API text search.
For example, the following request can search places that contain "Springfield Elementary" and have a type "school":
https://maps.googleapis.com/maps/api/place/textsearch/json?query=Springfield%20Elementary&type=school&key=YOUR_API_KEY
Visually, it looks like
I hope this helps!
来源:https://stackoverflow.com/questions/44609136/can-google-places-api-pull-specific-types-of-places-like-schools-without-a-loc