Google Places API中的数据缺失问题 [英] A Missing Data Issue in Google Places API

查看:150
本文介绍了Google Places API中的数据缺失问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Google Places API中遇到数据丢失问题!如以下示例所示,Google地图搜索结果中显示了Google地图的其他信息,例如手机号码,备用手机号码,传真号码,但不会通过Google Places API显示!



通过此链接,您可以注意到添加的备用电话号码
mobile: www.google.com/maps/place?cid= 4256683212236351718& q = hamza + kamaleddine + home& hl = en& ved = 0CBQQ-gswAA& sa = X& ei = cO4wT4arE8Wp8QOZqITuDA p

但使用Google Places API下面的HTTP请求),我正在检索以下Json对象:



地方搜索请求:
https:// maps。 googleapis.com/maps/api/place/search/json?location=33.8113420,35.619370&radius=500&name=hamza&sensor=false&key=AIzaSyBmT2NaND JqSmZceuXD-pUrtDyHsC8kcz4



地点详细信息请求:
https://maps.googleapis.com/maps/api/place/details/json?参考= CnRvAAAAbkRqsybX6Gvpr-nqkIYi1QJKegY900fj6dSPzPUST9RJBX_YZ9wlY3_sY27J1u31Et42bQVYgkTzR9FNW9PwhdfXOcWBE7J8AWFGNAX0CRK-WVh0bsReKMcNjKUHQ7nTvgrq9PUKJrQdJWNHSyQgHxIQe_tRjNX5NPBcbdN03NjgPBoUOGcFXglRkNVmm73z8WpFOErLT1s&安培;传感器=假安培;键= AIzaSyBmT2NaNDJqSmZceuXD-pUrtDyHsC8kcz4



在Place详细响应(JSON):

  {
html_attributions:[],
result:{
address_components:[
{
long_name:aley,
short_name:aley,
types:[locality,political]
},
{
long_name:LB,
short_name:LB,
types:[country,political]
},
{
long_name:1000,
short_name:1000,
types:[postal_code]
}
],
formatted_address:Ain Al Jdide Road,黎巴嫩Aley,
formatted_phone_number:70 975 590,
geometry:{
location :{
lat:33.8113420,
lng:35.619370
}
},
icon:http://maps.gstatic。 com / mapfiles / place_api / icons / generic_business-71.png,
id:a1063b63d187a576cf420e459aca9141e46bb8b6,
international_phone_num ber:+961 70 975 590,
name:Hamza Kamaleddine - Home,
reference:...,
types:[建立],
url:http://maps.google.com/maps/place?cid=4256683212236351718,
nearby:Ain Al Jdide Road,طريقعينالجديدة, Aley,
网站:http://lb.linkedin.com/in/hkamaleddine
},
状态:确定

}

正如您所看到的,手机号码,备用号码和传真号码都已丢失!

请问如何解决这个问题?

非常感谢!

解决方案

Google Places API目前不支持支持此功能。



Places API问题跟踪器中有一项功能请求:
http://code.google.com/p/gmaps-api-issues/issues/detail?id=3905



请点击'星号'图标以通知未来的变化,并让我们知道您有兴趣看到它的解决。



干杯



克里斯


I'm having a missing data problem in Google Places API! As seen in the example below, the Google Place additional info like mobile number, alternate phone, fax phone, are shown in the Google Map search results, but not through the Google Places API!

Following this link, you could notice the added alternate phone number, mobile:

www.google.com/maps/place?cid=4256683212236351718&q=hamza+kamaleddine+home&hl=en&ved=0CBQQ-gswAA&sa=X&ei=cO4wT4arE8Wp8QOZqITuDA

But using the Google Places API (using the HTTP request below), I am retrieving the following Json object:

The Place Search Request: https://maps.googleapis.com/maps/api/place/search/json?location=33.8113420,35.619370&radius=500&name=hamza&sensor=false&key=AIzaSyBmT2NaNDJqSmZceuXD-pUrtDyHsC8kcz4

The Place Details Request: https://maps.googleapis.com/maps/api/place/details/json?reference=CnRvAAAAbkRqsybX6Gvpr-nqkIYi1QJKegY900fj6dSPzPUST9RJBX_YZ9wlY3_sY27J1u31Et42bQVYgkTzR9FNW9PwhdfXOcWBE7J8AWFGNAX0CRK-WVh0bsReKMcNjKUHQ7nTvgrq9PUKJrQdJWNHSyQgHxIQe_tRjNX5NPBcbdN03NjgPBoUOGcFXglRkNVmm73z8WpFOErLT1s&sensor=false&key=AIzaSyBmT2NaNDJqSmZceuXD-pUrtDyHsC8kcz4

The Place Details Response (JSON):

{ 
   "html_attributions" : [], 
   "result" : { 
      "address_components" : [ 
         { 
            "long_name" : "Aley", 
            "short_name" : "Aley", 
            "types" : [ "locality", "political" ] 
         }, 
         { 
            "long_name" : "LB", 
            "short_name" : "LB", 
            "types" : [ "country", "political" ] 
         }, 
         { 
            "long_name" : "1000", 
            "short_name" : "1000", 
            "types" : [ "postal_code" ] 
         } 
      ], 
      "formatted_address" : "Ain Al Jdide Road, طريق عين الجديدة, Aley, Lebanon", 
      "formatted_phone_number" : "70 975 590", 
      "geometry" : { 
         "location" : { 
            "lat" : 33.8113420, 
            "lng" : 35.619370 
         } 
      }, 
      "icon" : "http://maps.gstatic.com/mapfiles/place_api/icons/generic_business-71.png", 
      "id" : "a1063b63d187a576cf420e459aca9141e46bb8b6", 
      "international_phone_number" : "+961 70 975 590", 
      "name" : "Hamza Kamaleddine - Home", 
      "reference" : "...", 
      "types" : [ "establishment" ], 
      "url" : "http://maps.google.com/maps/place?cid=4256683212236351718", 
      "vicinity" : "Ain Al Jdide Road, طريق عين الجديدة, Aley", 
      "website" : "http://lb.linkedin.com/in/hkamaleddine" 
   }, 
   "status" : "OK" 

} 

As you can notice, the mobile number, alternate, and fax numbers are missing!

How to solve this issue please?

Much Thanks!

解决方案

The Google Places API does not currently support this feature.

There is a feature request for this in the Places API issue tracker here: http://code.google.com/p/gmaps-api-issues/issues/detail?id=3905

Please click the 'star' icon to be notified of future changes, and to let us know you are interested in seeing it resolved.

Cheers

Chris

这篇关于Google Places API中的数据缺失问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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