We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When I attempt to send a request for some specific addresses, the response does not match the v6 API Playground results.
Example:
Expect: Same as playground.
Actual: The street number is dropped.
Code example:
const mbxGeocode = require("@mapbox/mapbox-sdk/services/geocoding-v6"); const geocodingClient = mbxGeocode({ accessToken: MAPBOX_ACCESS_TOKEN }); const fs = require("fs"); // add your address to this array in the same format as the example addresses const addresses = [ "464 Valley Brook Ave Lyndhurst NJ 07071", "12303 NE 130th Ln 520 Kirkland WA 98034", ]; function geocodeAddresses(addresses) { addresses.forEach((address) => { geocodingClient .forwardGeocode({ query: address, limit: 1, countries: ["US"], permanent: false, }) .send() .then((response) => { const results = response.body.features[0].id + ";" + response.body.features[0].properties.full_address + ";" + response.body.features[0].properties.coordinates.accuracy + ";" + response.body.features[0].properties.coordinates.longitude + ";" + response.body.features[0].properties.coordinates.latitude; console.log(results); }); }); } geocodeAddresses(addresses);
Do the request and params look correct?
The text was updated successfully, but these errors were encountered:
I may have found the cause. If I remove the countries: ['US'], parameter, the response appears as expected. Still testing.
countries: ['US'],
It's possible this is a case issue. Should be countries: ['us'] (lowercase).
countries: ['us']
Sorry, something went wrong.
No branches or pull requests
When I attempt to send a request for some specific addresses, the response does not match the v6 API Playground results.
Example:
Expect:
Same as playground.
Actual:
The street number is dropped.
Code example:
Do the request and params look correct?
The text was updated successfully, but these errors were encountered: