以下為高德解決方案
高德官方給出了解決辦法,詳見:https://lbs.amap.com/faq/js-api/map-js-api/position-related/46320/
1、引入sdk,版本需要在1.41或以上
<script type="text/javascript" src="http://webapi.amap.com/maps?v=1.4.1&key=您申請(qǐng)的key值"></script>
2、需要引入remogeo.js http://a.amap.com/jsapi_demos/static/remogeo/remogeo.js
3、新增代碼
if ((<any>window).AMap.UA.ios) {
//使用遠(yuǎn)程定位,見 remogeo.js
var remoGeo = new (<any>window).RemoGeoLocation();
//替換方法
navigator.geolocation.getCurrentPosition = function() {
//eslint-disable-next-line
return remoGeo.getCurrentPosition.apply(remoGeo,arguments);
};
//替換方法
navigator.geolocation.watchPosition = function() {
//eslint-disable-next-line
return remoGeo.watchPosition.apply(remoGeo, arguments);
};
}
示例

image.png