iPhone联系人如何在谷歌地图中找到地址?
我试图在我的 iPhone 应用程序中显示谷歌地图中的地址。 我尝试使用
NSString * theAddressString =......;
NSString * query = [NSString stringWithFormat:@"http://maps.google.com/maps?q=%@",theAddressString];
NSString * urlString = [query stringByAddingPercetntEscapesUsingEncoding:NSUTF8StringEncoding];
[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlString];
Google地图找不到我们提供的一些地址。(一些日语或中文地址)但是如果我将地址保存到iPhone联系人中。然后按 联系人的地址链接。它会跳转到谷歌地图,虽然谷歌地图首先警告“无法定位地址”,但在我确认警报消息后,另一个视图会显示谷歌地图中的位置或显示附近的地址。
所以iPhone的“联系人”应用程序可能会使用其他api来过滤地址字符串来定位地址,或者使用一些“模糊搜索”之王。
有人知道他们是如何实现的吗?
我真的很感谢你的帮助。
I was trying to show the address in google map in my iphone app.
I tried to use
NSString * theAddressString =......;
NSString * query = [NSString stringWithFormat:@"http://maps.google.com/maps?q=%@",theAddressString];
NSString * urlString = [query stringByAddingPercetntEscapesUsingEncoding:NSUTF8StringEncoding];
[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlString];
Google map can not find some addresses we provided.(Some Japanese or Chinese addresses) But if I saved the address to iPhone contacts. And then pressed
the contact's address link. It will jump to google maps,though google map first alerted that "can not locate the address", after I confirmed the alert message, another view would display the location in the google map or show the address in the nearby.
So iPhone's "Contact" app may use other apis to filter the address string to locate the address or using some king of "fuzzy search".
Does anybody know how do they achieve it?
I really appreciate your help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试以下一项,让我了解解决方案的状态。
带有给定地址的新代码:
我已经使用谷歌地图检查了查询字符串,它向我显示了谷歌地图中的图钉。
Try out the following one and let me about the status of solution.
New Code with give address:
I have checked the query string with google map and it is showing me the pin in Google map.