[英]IPhone Geocoding
There is absolutely no tutorials on geocoding on the iphone. 在iphone上绝对没有关于地理编码的教程。 Only reverse geocoding.
只有反向地理编码。 I have an address, want to convert to coordinates, then display a streetview of that address.
我有一个地址,想要转换为坐标,然后显示该地址的街景。 How can this be accomplished...
怎么能实现这个......
EDIT 编辑
The below answer pretty much echos what I found online, but I know this can be accomplished using Googles JSON geocoding. 以下答案几乎与我在网上找到的相似,但我知道这可以使用Googles JSON地理编码来完成。 I am working on this now, will update post when I figure out how to pull out the coordinates.
我正在研究这个问题,当我弄清楚如何拉出坐标时会更新帖子。
"http://maps.google.com/maps/geo?q="+ address+"&key="+apiKey+"&sensor=false&output=json"
built in forward geocoding is new to iOS5. 内置的前向地理编码是iOS5的新功能。 look at CLGeocoder, which includes methods like
geocodeAddressString:completionHandler:
. 查看CLGeocoder,其中包括
geocodeAddressString:completionHandler:
等方法。 if you want to support pre-iOS5 then you'll have to use another service, eg google's. 如果你想支持iOS5之前,那么你将不得不使用其他服务,例如谷歌。 i haven't used it myself, but a quick search turned up: https://github.com/mjisrawi/iOS-Geocoding-Services which may be of use.
我自己没有使用它,但是快速搜索了: https : //github.com/mjisrawi/iOS-Geocoding-Services可能有用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.