Google Places API:更多特定类型? [英] Google Places API: More specific types?
问题描述
当我点击"Justine's"时,我看到它被列为法国餐厅".(查看屏幕截图)
When I Google "Justine's" I can see that it's listed as a "French Restaurant". (See screenshot)
当我使用Google Places API获取有关同一地点的详细信息时,我只会看到类型"列表,其中包括诸如餐厅"和酒吧"之类的高级术语,但没有看到诸如法语"之类的特定类型餐厅".
When I use the Google Places API to get details about the same spot I only see a list of "types" that includes high-level terms like "restaurant" and "bar", but I see no specific types like "French Restaurant".
有人知道是否有可能获得这些数据吗?
Does anyone know if it's possible to get this data?
谢谢!
推荐答案
我认为您可能需要检查api上的文本搜索方法. https://developers.google.com/places/documentation/search#TextSearchRequests
I think you would probably have to check with the text search method on the api.. https://developers.google.com/places/documentation/search#TextSearchRequests
所以您的请求最终看起来像以下内容,仅限于特定区域
So your request would end up looking something like the below, restricted down to a specific area
https://maps.googleapis.com/maps/api/place/textsearch/json?query=French +Restaurant&sensor=true&location=yourLocationHere&radius=20&key=yourKeyHere
但是,这将返回该地区所有其他法国餐馆,因此,如果您只想返回一个结果,我会改用地点详细信息"请求
However this will return all other French restaurants in the area, so if you just want to return the one result I would use the Place Details request instead
这篇关于Google Places API:更多特定类型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!