使用地理位置按钮检索当前位置和Zip [英] Retrieving Current Location and Zip using Geolocation Button
问题描述
我想在我的 UISearchBar
附近放置一个 Geolocation按钮
,点击后它应该返回zip例如20043)。我将使用ZIP中的值来获取我附近的建筑物列表。
如果有人能够帮助我使用位置Button,以及实现如何返回ZIP( integer
)?
$ b
谢谢!
定制UIButton
适用于位置按钮吗?在iOS 4中没有前向地理编码(将地址变成lat / long),在iOS 5中有一些增强功能(这是在NDA下的,因此您需要访问Apple开发人员网站)。 如果您现在正在寻找某些东西,可以使用以下地址解析器: http://blog.sallarp.com/ipad-iphone-forward-geocoding-api- google /
至于按钮,这个项目有许多常用的地图套件按钮: https://github.com/myell0w/MTLocation
I want to place a Geolocation button
near my UISearchBar
, which on clicking, it should return the zip (eg. 20043). I will be using the value from the ZIP to get the list of buildings near me.
I would appreciate it if someone could help me with the location Button, and what are the methods to implement to return just the ZIP (integer
) ? And would a custom UIButton
work for the location button ?
Thank you!
In iOS 4 there is no forward geocoded (turning an address into lat/long), there are some enhancements to this in iOS 5 (this is under NDA, so you'll need to visit the Apple developers site).
If you're looking for something now, here is a forward geocoder you can use: http://blog.sallarp.com/ipad-iphone-forward-geocoding-api-google/
As for the button, there is this project that has many of the commonly used map kit buttons: https://github.com/myell0w/MTLocation
这篇关于使用地理位置按钮检索当前位置和Zip的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!