Spa*_*hal 6 google-geolocation ionic-framework ionic-native
请帮我解决这个问题,
地理定位插件不适用于某些 android 设备。它在不同的 Android 手机上进行了测试,以识别地图问题上的当前位置,发现以下结果:
============ 我已经测试了这几台设备 ==========
酷派3600I | 安卓 6.0.1 | 不工作
红米笔记4 | 安卓 7、MIUI 9 | 不工作
摩托克 3 | 安卓 6 | 不工作
红米笔记4 | 安卓 7、MIUI 9 | 不工作
红米4 | 安卓 7.1.2,MIUI 9.1 | 在职的
摩托 G4 Plus | 安卓 7.0 | 在职的
米注3 | 安卓 6+,MIUI 8+ | 在职的
荣誉冬青2加| | 在职的
三星J7 | | 在职的
摩托克 3 | | 在职的
GetLatLong(){
this.platform.ready().then(() => {
var myoption = {
timeout:5000,
enableHighAccuracy:true
}
this.geolocation.getCurrentPosition(myoption).then(resp => {
this.lattitude = resp.coords.latitude;
this.longitude = resp.coords.longitude;
this.location = "SUCCESS";
})
let latLng = new google.maps.LatLng(this.lattitude, this.longitude);
let mapOptions = {
center: latLng,
zoom: 14,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
this.map = new google.maps.Map(this.mapElement.nativeElement, mapOptions);
this.marker = new google.maps.Marker({
map: this.map,
zoom: 14,
animation: google.maps.Animation.DROP,
position: latLng,
});
})
}
Run Code Online (Sandbox Code Playgroud)
此链接中描述的所有细节。
| 归档时间: |
|
| 查看次数: |
490 次 |
| 最近记录: |