webloong
webloong
  • 发布:2024-11-06 16:50
  • 更新:2024-11-06 16:50
  • 阅读:64

uniapp 集成高德地图,拖动地图获取地址列表时报错!

分类:uni-app
plus.maps.Map.reverseGeocode(point, {}, (event) => {  
                        console.log(JSON.stringify(event))  
                        var address = event.address; // 转换后的地理位置  
                        var point = event.coord; // 转换后的坐标信息  
                        var coordType = event.coordType; // 转换后的坐标系类型  
                        var reg = /.+?(省|市|自治区|自治州|县|区)/g;  
                        var addressList = address.match(reg).toString().split(",");  
                        //注意 因为存在直辖市, 当所在地区为普通省市时,addressList.length == 3,city = addressList[1];当所在地区为直辖市时addressList.length == 2,city = addressList[0];  
                        // that.cityName = addressList.length == 3?addressList[1]:addressList[0];  
                        console.log(addressList);  
                    },  
                    function(e) {  
                        console.log("失败回调", e);  
                    }  
                );

报错信息:

{"code":-100,"message":"[Maps高德地图:1008]未知错误, http://lbs.amap.com/api/android-sdk/guide/error/"}

2024-11-06 16:50 负责人:无 分享
已邀请:

要回复问题请先登录注册