3 ms·
You're right, Mapbox does claim to search for businesses. If you're sticking with Mapbox, you'd probably need to a two-step lookup to obtain some useful result
by et-al 6y ago
You're right, Mapbox does claim to search for businesses.
If you're sticking with Mapbox, you'd probably need to a two-step lookup to obtain some useful results.
1. If there's no street address, check the search string to see if there's a city, or city, state. Find the lng,lat of that to use as the proximity bias. If nothing exists, use the user's current location. (Maybe this is why the mobile SDK is better.)
2. Then add the proximity bias while searching for the POI
But just a heads up, even a simple city query can be problematic. From personal experience, "san jose" would return San Jose in Costa Rica, or San Jose City in the Philippines, and rarely San Jose, CA, US unless a user was to type all that.
Google definitely has better NLP to handle user search queries.