“由于地址无效,Safari无法打开页面”为Google地图链接 [英] "Safari cannot open the page because the address is invalid" for Google Maps link

查看:527
本文介绍了“由于地址无效,Safari无法打开页面”为Google地图链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有iOS7的iPhone 4s,没有安装Google Maps应用程序。每当我尝试导航到它的位置链接时,它会在我身上闪烁一个错误消息:

 无法打开页面
Safari无法打开页面,因为地址无效

但是错误消失了点击确定),地图就会显示出来,并且所有后续的Google地图链接都将加载而不会出现此错误。当我清除我的缓存时,错误再次显示,但只是第一次,并且再次自行消失。



这是我所关注的链接使用,但我已经测试了多个链接,问题似乎是持久的:



https://www.google.com/maps/place /Kraftwork/@39.971494,-75.127336,17z/data=!3m1!4b1!4m2!3m1!1s0x0:0x6db3f86eca2f8b45?hl=en



任何想法是什么导致了这个问题?



具体来说,这个问题存在于直线html并试图点击地图链接。


也许你可以用你的XCode在iOS 8模拟器上试试它。



$ p $ [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@ https://www.google.com/maps/place/Kraftwork/@39.971494,-75.127336,17z/data=!3m1!4b1!4m2!3m1!1s0x0:0x6db3f86eca2f8b45?hl=en]];


I have an iPhone 4s with iOS7 that doesn't have the Google Maps app installed on it. Whenever I try to navigate to a location link on it, it flashes an error at me that says:

Cannot Open Page
Safari cannot open the page because the address is invalid

But then the error goes away (without having to hit OK) and the map shows up, and all subsequent Google Maps links load without this error. When I clear my cache, the error shows up again, but only for the first time, and again disappears on its own.

This is the link in question that I am using, but I have tested it with multiple links and the problem seems to be persistent:

https://www.google.com/maps/place/Kraftwork/@39.971494,-75.127336,17z/data=!3m1!4b1!4m2!3m1!1s0x0:0x6db3f86eca2f8b45?hl=en

Any idea what's causing this problem?

To be specific, this problem exists as a result of straight html and just attempting to click a maps link.

解决方案

I treid to paste to link in the Safari directly and do it programmatically in both iOS 7 and iOS 8 with iPhone 4s, both work for me. Maybe you can try it with iOS 8 simulator with your XCode too.

[[UIApplication sharedApplication] openURL:[NSURL URLWithString: @"https://www.google.com/maps/place/Kraftwork/@39.971494,-75.127336,17z/data=!3m1!4b1!4m2!3m1!1s0x0:0x6db3f86eca2f8b45?hl=en"]];

这篇关于“由于地址无效,Safari无法打开页面”为Google地图链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆