uniapp小程序打开外部地图


在manifest.json里面修改

"permission" : {
            "scope.userLocation": {
              "desc": "你的位置信息将用于小程序位置接口的效果展示" // 高速公路行驶持续后台定位
            }
        }

在menthods使用

getLocation(success) { //打开外部地图
                uni.getLocation({
                    success(res) {
                        console.log('定位1',res)
                        uni.openLocation({
                            latitude: res.latitude,
                            longitude: res.longitude,
                            scale: 18
                        })
                    }
                })
            },

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM