Skip to content

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

@janyx-cenan

Description

@janyx-cenan

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions