I am using MapboxAPI for geocoding but I am experiencing it is tending to approximate location to city center when it can not match exact location.
Per documentation there is fuzzyMatch(Boolean true:default) option that can change this behavior.
Since I am using MapboxAPI directly through URL I tried following but all of them are returning same result set.
/geocoding/v5/mapbox.places/[url_encoded_address_text].json?fuzzyMatch=true&access_token=pk.abc...
/geocoding/v5/mapbox.places/[url_encoded_address_text].json?fuzzyMatch=false&access_token=pk.abc...
/geocoding/v5/mapbox.places/[url_encoded_address_text].json?fuzzyMatch=1&access_token=pk.abc...
/geocoding/v5/mapbox.places/[url_encoded_address_text].json?fuzzyMatch=0&access_token=pk.abc...
Looks like fuzzyMatch option does not do anything.
Is there something I am doing wrong?
You are using it correctly with the true/false params (docs):
Using the example from the docs, a query using
types=placeofwahsingtonand thefuzzyMatch=trueparam yields"place_name": "Washington, District of Columbia, United States"while usingfuzzyMatch=falseyields no results.False -
https://api.mapbox.com/geocoding/v5/mapbox.places/wahsington.json?access_token=pk.abc...&fuzzyMatch=false&types=placeTrue -
https://api.mapbox.com/geocoding/v5/mapbox.places/wahsington.json?access_token=pk.abc...&fuzzyMatch=true&types=place