You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<template>
<MglMap :accessToken="accessToken" version="12" :mapStyle="mapStyle" />
</template>
<script>
import "mapbox-gl/dist/mapbox-gl.css";
import Mapbox from "mapbox-gl";
import { MglMap } from "v-mapbox";
export default {
components: {
MglMap,
},
data() {
return {
accessToken:
"xxx", // your access token. Needed if you using Mapbox maps
mapStyle: {}, // your map style
};
},
created() {
// We need to set mapbox-gl library here in order to use it in template
this.mapbox = Mapbox;
},
};
</script>
The text was updated successfully, but these errors were encountered:
You're passing an empty object to the mapStyle property - this should be a String or an object that conforms to the Mapbox Style Specification. The errors you are getting aren't errors for the map version, they're validation errors of the style object you've passed, the object should be in the format:
The text was updated successfully, but these errors were encountered: