打开腾讯地图的官网注册账号登陆进入,滑入我的头像开发者信息:https://lbs.qq.com/service/webService/webServiceGuide/webServiceOverview
2 找到添加的应用,添加key
3 webService API 查询
4 然后在manifest.json 中设置如下,以及小程序id
uniapp用到的api
uni.getLocation 获取当前的地理位置、速度。当用户离开小程序后,此接口无法调用。
uni.openLocation 使用微信内置地图查看位置
this.mapDom = uni.createMapContext('mapDom') 获取map id=mapDom 的实例
this.mapDom.includePoints includePoints 缩放视野展示所有经纬度
bug uni.getLocation 不触发直接将基础库调整为 2.17.0
你要去哪里:{{title}} - {{item.address}}
你的目的地
{{city}}
export const Debounce = (fn, wait) => {let delay = wait|| 500let timerreturn function () {let args = arguments;if (timer) {clearTimeout(timer)}let callNow = !timertimer = setTimeout(() => {timer = null}, delay)if (callNow) fn.apply(this, args)}
}