uni-app app端使用uni.chooseLocation选点定位地图中心没有标记点也没有定位到现在位置的图标

uni-app app端使用uni.chooseLocation选点定位地图中心没有标记点也没有定位到现在位置的图标

示例代码:

uni.chooseLocation({  
    latitude: 30.673844,  
    longitude: 114.275003,  
    success: function(res) {  
            console.log('===' + JSON.stringify(res))  
            if (res) {  
                that.address = res.address + res.name  
                that.site = {  
                        latitude: res.latitude,  
                     longitude: res.longitude  
                 }  
                 console.log(that.site);  
             }  
     },  
     fail(err) {  
             uni.showToast({  
                 title:err,  
                 icon:'none'  
             })  
     }  
 });

操作步骤:

uni.chooseLocation({  
    latitude: 30.673844,  
    longitude: 114.275003,  
    success: function(res) {  
            console.log('===' + JSON.stringify(res))  
            if (res) {  
                that.address = res.address + res.name  
                that.site = {  
                        latitude: res.latitude,  
                     longitude: res.longitude  
                 }  
                 console.log(that.site);  
             }  
     },  
     fail(err) {  
             uni.showToast({  
                 title:err,  
                 icon:'none'  
             })  
     }  
 });

预期结果:

  • 像附件2正常出现标记点和归位图标

实际结果:

  • 没有标记点和归位图标

bug描述:

app端使用uni.chooseLocation选点定位,地图中心没有标记点,也没有回到现在位置的图标

示例图片

示例图片


更多关于uni-app app端使用uni.chooseLocation选点定位地图中心没有标记点也没有定位到现在位置的图标的实战教程也可以访问 https://www.itying.com/category-93-b0.html

3 回复

使用小米 13 运行最新 HBuilderX alpha 运行你提供的代码正常,有定位标志和功能正常。你可以新建一个工程,或者使用 HBuilderX 内置的 hellouniapp 工程来运行,排除你的设置问题

更多关于uni-app app端使用uni.chooseLocation选点定位地图中心没有标记点也没有定位到现在位置的图标的实战教程也可以访问 https://www.itying.com/category-93-b0.html


请问你是使用的腾讯地图吗,我新建了一个工程也没有,但是用高德地图的话就有

回复 bonnenlt柠檬: 腾讯地图的确是问题,下个 alpha 会带上。 https://github.com/dcloudio/uni-app/commit/f9b42da871109e146f0eda2774acbc80f0abbe04

回到顶部