我想在我的 UISearchBar
附近放置一个 Geolocation 按钮
,点击该按钮时,它应该返回 zip(例如 20043).我将使用 ZIP 中的值来获取我附近的建筑物列表.
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.
如果有人可以帮助我使用位置按钮,我将不胜感激,以及实现仅返回 ZIP (integer
) 的方法是什么?custom UIButton
是否适用于位置按钮?
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 ?
谢谢!
在 iOS 4 中没有转发地理编码(将地址转换为 lat/long),在 iOS 5 中有一些增强(这是在 NDA 下,所以你需要访问 Apple 开发者网站).
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).
如果您现在正在寻找东西,这里有一个可以使用的正向地理编码器:http://blog.sallarp.com/ipad-iphone-forward-geocoding-api-google/
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/
至于按钮,有这个项目有很多常用的地图套件按钮:https://github.com/myell0w/MTLocation
As for the button, there is this project that has many of the commonly used map kit buttons: https://github.com/myell0w/MTLocation
这篇关于使用地理位置按钮检索当前位置和邮编的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!