We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c52770a commit 8460ea5Copy full SHA for 8460ea5
lib/index.js
@@ -685,7 +685,8 @@ MapboxGeocoder.prototype = {
685
// client only accepts one type for reverseGeocode, so
686
// use first config type if one, if not default to poi for v5 and address for v6
687
const defaultType = this.options.version === 'v6' ? ["address"] : ["poi"];
688
- config.types = config.types ? [config.types[0]] : defaultType;
+ // [TODO]: possibly remove. client can accept more than one type. also assigning something to config.types can break backward compatibility
689
+ config.types ? [config.types[0]] : defaultType;
690
config = extend(config,
691
this.options.version === 'v6' ? { longitude: coords[0], latitude: coords[1]} : { query: coords },
692
{limit: 1 }
0 commit comments