返回居委会的基础上与谷歌地理codeR / API地址 [英] Returning neighborhood based on address with Google geocoder/API
问题描述
有什么办法,有效地/准确的基础上的地址,邮编,城市,州对谷歌地理codeR过去了?
Is there any way to effectively/accurately pull out a neighborhood within a city based on a passed in address, zip, city, state to the Google Geocoder?
每当我尝试通过HTTP(理想的解决方案)做它返回以下信息
Whenever I try to do it via HTTP (ideal solution) It returns the following info
<kml>
−
<Response>
<name>anthonys cookies san francisco California</name>
−
<Status>
<code>200</code>
<request>geocode</request>
</Status>
−
<Placemark id="p1">
<address>San Francisco, CA, USA</address>
−
<AddressDetails Accuracy="4">
−
<Country>
<CountryNameCode>US</CountryNameCode>
<CountryName>USA</CountryName>
−
<AdministrativeArea>
<AdministrativeAreaName>CA</AdministrativeAreaName>
−
<SubAdministrativeArea>
<SubAdministrativeAreaName>San Francisco</SubAdministrativeAreaName>
−
<Locality>
<LocalityName>San Francisco</LocalityName>
</Locality>
</SubAdministrativeArea>
</AdministrativeArea>
</Country>
</AddressDetails>
−
<ExtendedData>
<LatLonBox north="37.8454521" south="37.7043396" east="-122.2913561" west="-122.5474749"/>
</ExtendedData>
−
<Point>
<coordinates>-122.4194155,37.7749295,0</coordinates>
</Point>
</Placemark>
</Response>
</kml>
如果你注意到,在地点名称依然旧金山说?
If you notice, the "locality name" still says San Francisco?
在这一点上我愿意利用相对于HTTP调用JavaScript API /调用,它只是似乎矫枉过正(更头疼的)为我所试图做的。
At this point I am open to making use of the Javascript API/call as opposed to the HTTP call, it just seemed like overkill (and more of a headache) for what I am trying to do.
在理想情况下,我需要这在旧金山工作,现在,但它会很好,如果我能得到它的所有主要的美国城市的工作。
Ideally, I need this to work in San Francisco for now, but it would be nice if I could get it to work for all of the major U.S. Cities.
推荐答案
据我所知,你无法通过谷歌地图API得到邻居的数据。你可以尝试像城市制图的邻里API另一个Web服务: http://developer.urbanmapping.com/demo/一个>或Maponics(http://www.maponics.com/Neighborhood_Boundaries/neighborhood_boundaries.html)。城市制图的API包含了通过经纬度长,还有各种地址元素得到邻里的方法。
As far as I know, you can't get Neighborhood data through the google maps API. You can try another web service like Urban Mapping's Neighborhood API: http://developer.urbanmapping.com/demo/ or Maponics (http://www.maponics.com/Neighborhood_Boundaries/neighborhood_boundaries.html). Urban Mapping's API contains methods for getting neighborhood by lat long and also various address elements.
这篇关于返回居委会的基础上与谷歌地理codeR / API地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!