下面的链接(Maps API)发现肯辛顿圣地亚哥是邻居。 https://maps.googleapis.com/maps/api/geocode/json?address=kensington,%20san%20diegoGoogle地方找不到Google地图API的位置
{
"results" : [
{
"address_components" : [
{
"long_name" : "Kensington",
"short_name" : "Kensington",
"types" : [ "neighborhood", "political" ]
},
{
"long_name" : "San Diego",
"short_name" : "San Diego",
"types" : [ "locality", "political" ]
},
{
"long_name" : "San Diego County",
"short_name" : "San Diego County",
"types" : [ "administrative_area_level_2", "political" ]
},
{
"long_name" : "California",
"short_name" : "CA",
"types" : [ "administrative_area_level_1", "political" ]
},
{
"long_name" : "United States",
"short_name" : "US",
"types" : [ "country", "political" ]
}
],
"formatted_address" : "Kensington, San Diego, CA, USA",
"geometry" : {
"bounds" : {
"northeast" : {
"lat" : 32.777394,
"lng" : -117.0968502
},
"southwest" : {
"lat" : 32.755116,
"lng" : -117.1127622
}
},
"location" : {
"lat" : 32.7668062,
"lng" : -117.1058848
},
"location_type" : "APPROXIMATE",
"viewport" : {
"northeast" : {
"lat" : 32.777394,
"lng" : -117.0968502
},
"southwest" : {
"lat" : 32.755116,
"lng" : -117.1127622
}
}
},
"place_id" : "ChIJQXneX0pU2YARsIgYMQOsyks",
"types" : [ "neighborhood", "political" ]
}
],
"status" : "OK"
}
下面的链接(Places API的)不能找到它 https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=36.26361161176487,-115.12227065576182&keyword=kensignton,%20san%20diego&rankby=distance
{
"html_attributions" : [],
"results" : [],
"status" : "ZERO_RESULTS"
}
但是(当然这其中不会没有API密钥,但即便用钥匙将其与ZERO_RESULTS响应工作)我无法使用map api在我附近找到星巴克(我试过了,它把我送到了加拿大)。所以...我如何搜索星巴克,邻里或地址,并获得合理的结果
一些蹩脚的人downvoted的问题...... meh – user438431