简体   繁体   中英

How to search google places api using keywords?

I want to build an application that allows users to search Google Places and have the data represented in a simple format like a tabular data. Say if my user type "san francisco restaurants" my application will then return a table with all restaurants in san francisco. I don't need to display maps just the names and address of restaurants. I have looked into Google Places API and this requires a latitude and longitude in its parameters. How will I get that lat. long. base on the query? Thanks!

您可以使用Google地理编码API(http://maps.googleapis.com/maps/api/geocode/json?address=san+francisco&sensor=false)来获取经度/纬度,但您必须拿出某种解析方法可以从查询字符串中获取位置信息(“旧金山的餐馆”与“旧金山的餐馆”)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM