CaribouCode
CaribouCode

Reputation: 14438

Convert zip/postcode to latitude and longitude with mapbox API

I'm using Mapbox in a web app. I have functionality where a user inputs a zipcode and it should display on the map then do some other stuff with the data. All I'm trying to do right now is convert the zipcode to latitude and longitude to display the marker on the map and log the coordinates. Is there a way to do this in the Mapbox API? If so I can't seem to find it. If not, is there another easy way to do this?

Upvotes: 2

Views: 4514

Answers (1)

iH8
iH8

Reputation: 28688

Mapbox has it's own geocoding API in public beta:

Geocoding requests are queries composed of location text or lat/lon coordinates that can be used to find corresponding place data. A geocoding request includes a geocoding {index} in requests which specifies the dataset to use to find place data.

https://www.mapbox.com/developers/api/geocoding/

Upvotes: 2

Related Questions