Can Google Places API pull specific types of places, like schools, without a location?

眉间皱痕 提交于 2019-12-11 07:15:30

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!