首页 > 解决方案 > Internet Explorer 11 中未加载地理位置

问题描述

我正在研究角度 6,我正在尝试使用 Internet Explorer 11 中谷歌地图的地理位置来获取当前位置的纬度/经度。但无法获取坐标。请在下面找到我的代码,

if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(position => {
this.location = position.coords;
this.lat = +this.location["latitude"].toFixed(6);
this.lng = +this.location["longitude"].toFixed(6);
});
}

标签: angulargoogle-mapsinternet-explorer-11

解决方案


推荐阅读