我想在我的组件中使用VueMapBox。但是ii访问令牌出错。我正在使用公共访问权限。这是我的代码:
<template>
<MglMap :accessToken="accessToken" :mapStyle.sync="mapStyle" />
</template>
<Script>
import { MglMap } from "vue-mapbox";
export default {
components: {
MglMap
},
data:function() {
return {
accessToken: '//Token',
mapStyle: {
"version": 8,
"name": "Mapbox Streets",
"sprite": "mapbox://sprites/mapbox/streets-v8",
"glyphs": "mapbox://fonts/mapbox/{fontstack}/{range}.pbf",
},
}},
},
<script>
公开令牌是:pk.eyJ1IjoiamFiYXgiLCJhIjoiY2pybXZnZzVlMGxseDQ0bzVjaW13N3NveCJ9.X-c5Qhmp-Wpr441etkTgag
谢谢!