user776686
user776686

Reputation: 8685

Is mapbox geocoder API available for usage without a map?

I am reading through mapbox JS api but don't seem to find any the geocoding API call that would enable me to provide place lookup using my own typeahead component. So basically I am after sending out a query and receiving an array of results.

I do not mean the example on how to place geocoder Control on or off the map, but rather how can I provide places lookup in my own form [Angular, React, whatever] that does not display any map. Is that possible at all?

Upvotes: 2

Views: 3290

Answers (3)

user17381076
user17381076

Reputation: 1

July 1, 2019: Removed the default restriction that Services have to be used in conjunction with a Mapbox map. Point of interest results from the Geocoding API and Enterprise Boundaries must still be used in conjunction with a Mapbox map.

Upvotes: 0

Carlo Nyte
Carlo Nyte

Reputation: 765

[UPDATE May 2020]

Mapbox now does allow you to use a Geocoder without using a map (search form with autocomplete)

July 1, 2019: Removed the default restriction that Services have to be used in conjunction with a Mapbox map. Point of interest results from the Geocoding API and Enterprise Boundaries must still be used in conjunction with a Mapbox map.

Examples can be found from the Mapbox website and from Mapbox Github page.

This previous answer shows an alternative plugin/ service called Algolia that you can use to create a Geocoder.

Another alternative is to use Geocodio.

However, both Geocodio AND Mapbox Geocoder (without a map present) do not support POI (Point of Interest) E.g. A named place including commercial businesses, public buildings, monuments, and parks, etc.

Hope this helps someone in the future!

Upvotes: 3

Vadim Gremyachev
Vadim Gremyachev

Reputation: 59388

This is apparently the violation of Mapbox's terms of service:

You may only use responses from the Geocoding API ("Geocodes") in conjunction with a Mapbox map.

That's the reason why mapbox-gl-js MapboxGeocoder control (which consumes Mapbox Geocoding API) comes in conjunction with a Mapbox map only and means your scenario is not supported.

Upvotes: 2

Related Questions