Skip to main content

Global Configuration

This page includes reference documentation for the global config singleton available in the Mapbox Search JS Web framework.

config

Global configuration singleton object storing settings shared across Search JS Web components.

Properties

accessToken(string): A Mapbox access token used if one is not passed in explicitly to web components.
feedbackEnabled(boolean): If true, Address Autofill address or marker location corrections will be submitted to the Mapbox Contribute API to help improve our data accuracy. Defaults to true.

Example

config.accessToken = 'pk.abc.123';
...
// Don't need to explicitly pass in token to some components
autofill({});
confirmAddress(form);
Was this section on config helpful?
Was this page helpful?