The getCurrentPosition of Baidu api cannot be triggered twice on ios Wechat.

var geolocation = new BMap.Geolocation ();

            alert(1)                
        geolocation.getCurrentPosition(function(r){
            alert(2)
            if(this.getStatus() == BMAP_STATUS_SUCCESS){    
                _self.latitude = r.point.lat;
                _self.longitude = r.point.lng;
                var point = new BMap.Point(r.point.lng,r.point.lat);//
                // _self.map.setCenter(point);
                var gc = new BMap.Geocoder();
                gc.getLocation(point, function(rs){
                    var addComp = rs.addressComponents;// 
                    _self.map.centerAndZoom(point,12);                 
                    if(isCity(addComp)){
                        _self.provinceIndex = isCity(addComp);
                        _self.province = addComp.province;
                        _self.currentCity = addComp.city.split("")[0];
                    }else{
                        _self.getData();
                    }           
                });
            }else {
            }        
        },{enableHighAccuracy: true})
        iosh52getCurrentPosition
Aug.27,2021
Menu