mapbox / mapbox-sdk-js

A JavaScript client to Mapbox services, supporting Node, browsers, and React Native
Other
706 stars 185 forks source link

FuzzyMatch query param missing from forwardGeocode #377

Open atomickxx opened 4 years ago

atomickxx commented 4 years ago

i was trying to use the FuzzyMatch param from the API docs today, & i got the error the fuzzyMatch keys isn't valid, so i went & check the geocoding.js file & yeah fuzzyMatch isn't here

Geocoding.forwardGeocode = function(config) {
  v.assertShape({
    query: v.required(v.string),
    mode: v.oneOf('mapbox.places', 'mapbox.places-permanent'),
    countries: v.arrayOf(v.string),
    proximity: v.coordinates,
    types: v.arrayOf(v.oneOf(featureTypes)),
    autocomplete: v.boolean,
    bbox: v.arrayOf(v.number),
    limit: v.number,
    language: v.arrayOf(v.string)
  })(config);

  config.mode = config.mode || 'mapbox.places';

  var query = stringifyBooleans(
    xtend(
      { country: config.countries },
      pick(config, [
        'proximity',
        'types',
        'autocomplete',
        'bbox',
        'limit',
        'language'
      ])
    )
  );
andrewharvey commented 4 years ago

Did you want to try and work on a PR for this?