谷歌地理编码从谷歌地图返回完全不同的结果 [英] Google Geocoding returning totally different result from Google Map

查看:148
本文介绍了谷歌地理编码从谷歌地图返回完全不同的结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

澳大利亚维多利亚省查尔斯拉筹伯P-12学院



谷歌地图产生所在学院的确切位置。

然而,当通过GEOCODE API请求时,无论是
http://maps.googleapis.com/maps/api / geocode / json?address = Charles + La + Trobe + P-12 + College,Victoria,Australia& sensor = false

或在其演示页上
https://developers.google.com/maps/documentation / javascript / examples / geocoding-simple



上面的地址得到的结果远非精确位置。

有什么想法?

解决方案

地方不是一个geocoded结果。

  Charles La Trobe P-12 College 
235 Kingsbury Dr,Macleod Victoria 3085 ,澳大利亚
+61 3 9223 1400·vic.edu.au

地点API会查找正确的位置(作为第一个结果)。地理编码器返回澳大利亚维多利亚州的一个结果(-37.4713077,144.7851531),这是您在给它的字符串中找到的最佳地址。

http://www.geocodezip.com/v3_example_geo2.asp?addr1=Charles%20La%20Trobe%20P-12%20College,Victoria,Australia&addr2 = Charles%20La%20Trobe%20P-12%20College,Victoria,Australia& place = 1&geocode = 2

For the location of

Charles La Trobe P-12 College,Victoria,Australia

Google maps produce the exact location of said college.

However, when requested via GEOCODE API, either http://maps.googleapis.com/maps/api/geocode/json?address=Charles+La+Trobe+P-12+College,Victoria,Australia&sensor=false

or on their demo page https://developers.google.com/maps/documentation/javascript/examples/geocoding-simple

the address above gets a result thats far, far from the exact location.

any ideas?

解决方案

The entry on Google Maps is a "place" not a geocoded result.

Charles La Trobe P-12 College
235 Kingsbury Dr, Macleod Victoria 3085, Australia ‎
+61 3 9223 1400 ‎ · vic.edu.au 

The Places API finds the correct location (as the first result). The geocoder returns a result for Victoria, Australia (-37.4713077, 144.7851531), which is the best "address" it can find in the string you gave it.

http://www.geocodezip.com/v3_example_geo2.asp?addr1=Charles%20La%20Trobe%20P-12%20College,Victoria,Australia&addr2=Charles%20La%20Trobe%20P-12%20College,Victoria,Australia&place=1&geocode=2

这篇关于谷歌地理编码从谷歌地图返回完全不同的结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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