A geocoder control for Mapbox GL JS
npm install @mapbox/mapbox-gl-geocoderMapbox GL Geocoder 
---
A geocoder control for mapbox-gl-js using the Mapbox Geocoding API. For a JavaScript geocoder without a graphical user interface see the Mapbox SDK for JS.
* https://docs.mapbox.com/mapbox-gl-js/example/mapbox-gl-geocoder/
* https://docs.mapbox.com/mapbox-gl-js/example/?search=mapbox-gl-geocoder
If you are supporting older browsers, you will need to use a polyfill. We recommend working with @babel/polyfill.
``bash`
npm install --save @mapbox/mapbox-gl-geocoder
`js
import MapboxGeocoder from '@mapbox/mapbox-gl-geocoder';
import '@mapbox/mapbox-gl-geocoder/dist/mapbox-gl-geocoder.css';
...
const geocoder = new MapboxGeocoder({
accessToken: mapboxgl.accessToken,
mapboxgl: mapboxgl
});
`
#### API Documentation
See API.md for complete reference.
#### Examples
See https://docs.mapbox.com/mapbox-gl-js/examples/#geocoder.
See CONTRIBUTING.md.