Sometimes Mapbox will generate false results when using text based addresses. It’s much more reliable to use coordinates. Perhaps use the Radar integration to convert address to coordinates and then use those for the map component
I mean I understand with an incomplete address this can fail, but how can fail if you have “CH” and “Switzerland” in your address… like I don’t understand.
Not sure, but it happens. Sometimes I’ll have a complete address that points to a small town in an American state but instead Mapbox thinks it’s in the Middle East somewhere.
For all we know, it could be pointing to the Switzerland embassy in Cambodia. I mean, how can you say with 100% confidence that the word Switzerland in the address is referring to the country, and not any other address in the world that has Switzerland in the name or address of the location? Other than the fact that we just know…how does a computer know? At best, it’s a loose form of AI and we all know how well AI can hallucinate sometimes.
Writing code that can reliability parse and interpret the million ways to write an address is hard. Then to reliably cross reference that to a real address to obtain corresponding coordinates to pinpoint on a map is another thing. That’s the problem when you have only one address field as opposed to separate name, address, city, state, country, etc. Nobody writes addresses in one standard format, so it leads to a lot of interpretation by the programmer when trying to work with such a variable input.
This thing is, Google has a lot of money to get it right, or close to right…Mapbox, probably not so much, and that’s why they are cheaper to integrate. If I were to guess, Mapbox’s geocoding ability is probably more accurate with United States addresses.
That’s understandable, so how could Mapbox not be wrong? Because for example a postal code with CH-1900 it is impossible to be wrong because there are universal codes for each country in the world, is there a way to force MAPBOX to interpret an address?
For example force mapbox to understand that we spoke of a city and or a country? I don’t know there may be a way of doing things at Mapbox that I don’t know…
Like for dates, maybe we are obligate to set country first or I don’t know
It’s basically a confidence score. How confident is code that the match was really what a user wanted out of probably hundreds of possible matches.
The way that Mapbox is integrated into Glide, we can only feed it one value for an address. I don’t think there is a way to specify what we are searching for, or specify a country. It’s a best “guess” on Mapbox’s part.
The only thing that is reliable and standard across the world is coordinates. Coordinates will give you the correct location every single time.
Of course, this is understandable in view of the infinite addresses in the world, on the other hand where I have a certainty it is this one. If we can force mapbox to interpret the country code of the address, then there will be no possible error.
So yeah, I guess if Glide provided a way to pass a country code to the API, it would help. But we do have alternative integrations such as Radar, which may be more accurate.