mapbox / mapbox-gl-geocoder

Geocoder control for mapbox-gl-js using Mapbox Geocoding API
https://mapbox.com/mapbox-gl-js/example/mapbox-gl-geocoder/
ISC License
362 stars 181 forks source link

error: query must be an array with 2 items #505

Open delebash opened 1 year ago

delebash commented 1 year ago

Using reverse coding if there is a space at the beginning or end of coordinates throws this error.

Solution: Trim whitespaces on input

Screenshot 2023-08-07 154949

Screenshot2 2023-08-07 154949

The same thing happens on the example page. https://docs.mapbox.com/mapbox-gl-js/example/mapbox-gl-geocoder-accept-coordinates/