页面写了
<script charset=“utf-8” src=“http://map.qq.com/api/js?v=2.exp&key=****”></script>
腾讯位置服务也开启了
还是报鉴权失败,请传入正确的key
并且map不能显示地点的信息
<map markers="{{markers}}" include-points="{{markers}}" id=“myMap” scale=“9” show-location=“false” latitude=’{{latitude}}’ longitude=’{{longitude}}’ style=‘width:100%;height:100vh’></map>
js如下:
const app = getApp()
const constants = require(’…/…/utils/constants.js’)
const util = require("…/…/utils/util.js");
const auth = require(’…/…/utils/auth.js’)
Page({
data: {
longitude: ‘’,
latitude: ‘’,
markers: [],
},
onLoad: function (options) {
var me = this;
var markers = JSON.parse(options.markers);
console.log(markers)
wx.getLocation({
type: “gcj02”,
success: function (res) {
console.log(res)
me.setData({
longitude: res.longitude,
latitude: res.latitude,
markers: markers
})
},
fail: function () {
wx.showToast({
title: ‘请开启定位服务后重试’,
})
}
})
},
})
开发工具还是真机的问题?是哪个版本的开发工具?
提供一下代码片段看看(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)