Google地图“放置” vs“地址” [英] Google Maps "place" vs "address"

查看:108
本文介绍了Google地图“放置” vs“地址”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我最近对Google Maps API的另一个跟进问题。



以下请求会返回零结果...



http://maps.googleapis.com/maps/api/geocode/json?address=801+BALTIMORE+STREET%2c+Hanover%2c+PA%2c+17331&sensor = false 然后,从 http:// maps .google.com 以下地址正确定位...

 美国宾夕法尼亚州汉诺威巴尔的摩街801号

在上一个问题中,答案是因为从地图返回的结果是地点而不是地址 。



我的新问题是,你怎么能告诉地图正在返回一个地点与地址?如果你看看 https://maps.google.com/maps?q=801+Baltimore+Street,+Hanover,+PA&hl=en&sll=32.824552,-117.108978&sspn=0.691256,0.883026&hq=801+ Baltimore + Street,+ Hanover,+ PA& radius = 15000& t = m& z = 13rel =nofollow>谷歌地图,注意3条评论,这是一个地方条目。该条目阅读的方式也表明了这一点:

 巨人
801巴尔的摩街,汉诺威,PA
(717)632-6673·giantfoodstores.com
3条评论

看来上面的链接第一次不起作用,但是如果你点击搜索就会找到它。


This is a followup question to another I recently had about the Google Maps API.

The following request returns zero results...

http://maps.googleapis.com/maps/api/geocode/json?address=801+BALTIMORE+STREET%2c+Hanover%2c+PA%2c+17331&sensor=false

However, from http://maps.google.com the following address locates correctly...

801 Baltimore Street, Hanover, PA

From the previous question the answer was because the result returned from maps is a "place" and not an "address".

My new question is how can you tell maps is returning a "place" vs and "address"? Is there something in the URL or the response that gives this away?

解决方案

If you look at the response on Google Maps, notice the "3 reviews", that is a places entry. The way the entry reads also indicates it to me:

Giant
801 Baltimore St, Hanover, PA ‎
(717) 632-6673 ‎ · giantfoodstores.com
3 reviews 

It seems that the link above doesn't work the first time, but if you click on the "search" it finds it.

这篇关于Google地图“放置” vs“地址”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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