作者James840617 (James Li)
看板Web_Design
标题[问题] Chrome getCurrentPosition()疑问
时间Sun Dec 4 14:27:04 2016
板上的高手大家好!
在下是半桶水的专题生
用HTML写网页
因为需要网页提供GPS、地图等功能
参考这位大大的现成code
http://blog.xuite.net/gkyo0510/wretch/242769650-html5(GPS%E5%9C%B0%E7%90%86%E5%AE%9A%E4%BD%8D)
一开始用没问题但後来出现
getCurrentPosition() and watchPosition() no longer work on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See
https://goo.gl/rStTGz for more details.
以下是localhost跟用区网ip打开的情形
http://i.imgur.com/pPkh5H8.jpg
http://i.imgur.com/0rZsBQT.jpg
请问我要怎麽改code
网路查到都是英文内容
似乎是安全性阻挡的因素
跪求大大解救
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 36.226.193.239
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Web_Design/M.1480832827.A.FB6.html
1F:推 pm2001: such as 'HTTPS' 12/04 14:29
2F:→ James840617: pm大大 我用的是xampp,是不是改成https就正常了? 12/05 21:16