为什么有些结果会显示在Google地图中,但不会显示在Places API结果中? [英] Why do some results show up in Google Maps but not in Places API results?

查看:86
本文介绍了为什么有些结果会显示在Google地图中,但不会显示在Places API结果中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,当我在Google地图上搜索Dobry时,我会得到以下结果: http://maps.google.de/maps/place?q=dobry&hl=de&cid=15804306880695571087



<但是,当我尝试从Places API检索同一家餐厅时, https://maps.googleapis.com/maps/api/place/search/json?location=48.1321091,11.366& ; radius = 500& types = establishment& sensor = false& name = Dobry& key = ABCDEF1234 ,得到 ZERO_RESULTS



如何检索该公司的 id (不是cid)标签?为什么结果不同?经纬度位置应该是正确的。我做错了什么?

解决方案

我有完全相同的问题:

RestaurantDa Bruno出现在Google地图中:

http://maps.google.com/maps/place?cid=6903340902649387066



但是在地方找不到API:

https://maps.googleapis.com/maps/api/place/search/json?location= 20.550509,-91.40625& radius = 500& types = establishment& sensor = false& name = Da + Bruno& key = YOUR_ID_HERE

我的理论是Places API不会查询与Google地图相同的数据库,但是如果满足特定条件,Google地图数据库中的POI也会被复制到地点A PI数据库,这就是为什么原始海报的POI现在在两者中。



如果我找到更多,会更新。


Ok, so when I search for "Dobry" on Google Maps I get this result: http://maps.google.de/maps/place?q=dobry&hl=de&cid=15804306880695571087

But when I try to retrieve that same restaurant from the Places API, https://maps.googleapis.com/maps/api/place/search/json?location=48.1321091,11.366&radius=500&types=establishment&sensor=false&name=Dobry&key=ABCDEF1234, I get ZERO_RESULTS.

How can I retrieve the id (not cid) Tag of that establishment? And why do the results differ? The lat/long location should be right. What am I doing wrong?

解决方案

I have the exact same issue:

Restaurant "Da Bruno" shows up in Google maps:

http://maps.google.com/maps/place?cid=6903340902649387066

But cannot be found in Places API:

https://maps.googleapis.com/maps/api/place/search/json?location=20.550509,-91.40625&radius=500&types=establishment&sensor=false&name=Da+Bruno&key=YOUR_ID_HERE

My theory here is that Places API does not query the same database as Google Maps, but if certain conditions are satisfied, POIs from the Google Maps database are also copied to the Places API database, which is why the original poster's POI is now in both.

Will update if I find more.

这篇关于为什么有些结果会显示在Google地图中,但不会显示在Places API结果中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆