If you are supporting older browsers, you will need a Promise polyfill. es6-promise is a good one, if you're uncertain.
Usage with a module bundler
This module exports a single class called MapboxGeocoder as its default export, so in browserify or webpack, you can require it like:
var MapboxGeocoder = require('@mapbox/mapbox-gl-geocoder');
See API.md for complete reference.
- Add a geocoder to Mapbox GL JS
- Place the geocoder input outside the map
- Limit geocoder results to a named region
- Supplement geocoding search results from another data source
- Accept coordinates as input to a geocoder