mapbox / mapbox/mapbox-gl-geocoder
GeoCoder query function returns undefined style error
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 388
- Forks
- 181
- PR merge metrics
- No merged PRs in 30d
Description
whenever using the query function on the geoCoder instance an error of Undifined is returned on the object style

mapboxgl.accessToken = this.mapboxToken;
this.map = new mapboxgl.Map({
container: 'map-element',
style: 'mapbox://styles/mapbox/light-v10',
center: [-103.59179687498357, 40.66995747013945],
zoom: 3
})
let geocoder = new MapboxGeocoder({
accessToken: mapboxgl.accessToken,
mapboxgl: mapboxgl,
marker: false,
})
geocoder.query('new york')`
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the MapboxGeocoder setup and geocoder.query('new york') shown in the report. Trace the query entry point and identify why the result produces an undefined style error; done means the query completes without that error and returns the expected result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100