5.0.3 • Published 9 months ago

@mapbox/mapbox-gl-geocoder v5.0.3

Weekly downloads
44,965
License
ISC
Repository
github
Last release
9 months ago

Mapbox GL Geocoder Build Status

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.

Usage

If you are supporting older browsers, you will need to use a polyfill. We recommend working with @babel/polyfill.

Usage with a module bundler

npm install --save @mapbox/mapbox-gl-geocoder
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
});

Using without a Map

It is possible to use the plugin without it being placed as a control on a mapbox-gl map. Keep in mind that the Mapbox Terms of Service require that POI search results be shown on a Mapbox map. If you don't need POIs, you can exclude them from your search results with the options.types parameter when constructing a new Geocoder.

Deeper dive

API Documentation

See API.md for complete reference.

Examples

See https://docs.mapbox.com/mapbox-gl-js/examples/#geocoder.

Contributing

See CONTRIBUTING.md.

5.0.3

9 months ago

5.0.2

2 years ago

5.1.0-beta.0

2 years ago

5.0.1

3 years ago

5.0.0

3 years ago

4.7.4

4 years ago

4.7.3

4 years ago

4.7.2

4 years ago

4.7.1

4 years ago

4.7.0

5 years ago

4.6.0

5 years ago

4.5.1

6 years ago

4.5.0

6 years ago

4.4.2

6 years ago

4.4.1

6 years ago

4.4.0

6 years ago

4.3.0

6 years ago

4.2.0

6 years ago

4.1.2

6 years ago

4.1.1

6 years ago

4.1.0

6 years ago

4.0.0

6 years ago

4.0.0-beta.0

6 years ago

3.1.6

6 years ago

3.1.5

6 years ago

3.1.4

6 years ago

3.1.3

6 years ago

3.1.2

6 years ago

3.1.1

6 years ago

3.1.0

6 years ago

3.0.1

6 years ago

3.0.0

6 years ago

2.3.0

7 years ago

2.2.0

7 years ago

2.1.2

8 years ago

2.1.1

8 years ago

2.1.0

8 years ago

2.0.1

8 years ago