mapbox / mapbox/mapbox-gl-geocoder

GeoCoder query function returns undefined style error

Open
#407 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

auto-triaged docs improvement
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

![Screen Shot 2020-12-16 at 10 20 24 PM](https://user-images.githubusercontent.com/9604666/102443685-ef075900-3fec-11eb-824b-a845fbba8319.png)



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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.