SamSamskies / react-map-gl-geocoder

React wrapper for mapbox-gl-geocoder for use with react-map-gl
MIT License
122 stars 29 forks source link

"Fake" Geocoder results from Array #60

Closed Matt-Vance closed 4 years ago

Matt-Vance commented 4 years ago

Less an issue and more a question. I have been using the Geocoder on one of my projects and it works great. However, I would like to import some data from TripAdvisor but they do not have the same cityId or lat/long values as the setup I am using. So, I would like to take the array of city names I have from TA and have them automatically go into the Geocoder and build an array of the results. Just wanting to know if this is possible.

My goal is to have a button like "Import from TA" that the user presses and then the site takes a minute or two to try each place in the array to see if a Geocoder result can be acquired.

I think I had read in one of your responses that this is "not recommended", just wanted to see if you could comment on it.

Thanks!

SamSamskies commented 4 years ago

Hi @GreenWithMV, I'd suggest hitting the Mapbox API directly for what you are trying to do. https://docs.mapbox.com/api/search/