Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No mapboxgl detected in options. Map markers are disabled. Please set options.mapboxgl. #17

Open
janyx-cenan opened this issue Feb 28, 2020 · 1 comment

Comments

@janyx-cenan
Copy link

I am a new programmer. Thank you very much for this package.

I have been running into the No mapboxgl detected error and therefore not receiving markers. I tried to pass on the object but still did not work.

I went into the GeocoderControl.js in src and saw that there was no prop to receive the mapboxgl so I added a null object after creating that prop.
props: {
// Mapbox-geocoder options
accessToken: {
type: String,
required: true
},
zoom: {
type: Number,
default: 16
},
...
// Component options
input: {
type: String,
default: null
},
mapboxgl:{
type: Object,
default: null
},
},

It seems to have worked. Now I can pass the mapboxgl object.

The error is gone but I wonder if I did something terribly wrong.

@RonAlmog
Copy link

i believe its a bug. it happens when you do exactly as described here:
https://soal.github.io/vue-mapbox/plugin_components/#using-plugin-components
a hint on the root cause can be found here:
mapbox/mapbox-gl-geocoder#252
but i don't know enough of this family of components to fix that.
we'll have to wait for @soal . only he can save us from this ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants