【发布时间】:2017-09-22 18:08:48
【问题描述】:
我使用的是 html5 地理位置 我是根据文档制作的
getLocation() {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(this.showPosition, this.showError);
} else {
alert("geolocation not support");
}
},
如果我使用的是 chrome,代码工作(toogle 设备工具栏) 但在移动浏览器 chrome(android) safari(ios) 中显示错误
用户没有分享位置
如何解决?
在手机上启用地理定位
UPD:这很可能是因为没有 ssl 证书?
【问题讨论】:
标签: javascript html geolocation