作者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://www.ptt.cc/bbs/Web_Design/M.1480832827.A.FB6.html
推 pm2001: such as 'HTTPS' 12/04 14:29
→ James840617: pm大大 我用的是xampp,是不是改成https就正常了? 12/05 21:16