-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
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
fence-1145-make-the-autocomplete-function-take-a-countrycode-param #303
base: master
Are you sure you want to change the base?
fence-1145-make-the-autocomplete-function-take-a-countrycode-param #303
Conversation
var callbackStatus: Radar.RadarStatus? = null | ||
var callbackAddresses: Array<RadarAddress>? = null | ||
|
||
Radar.autocomplete("brooklyn roasting", country="UK", expandUnits = true) { status, addresses -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice testing the named params like this -- why don't we also test with named param for countryCode
as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
few small things
/** | ||
* Autocompletes partial addresses and place names, sorted by relevance. | ||
* | ||
* @see [](https://radar.com/documentation/api#autocomplete) | ||
* | ||
* @param[query] The partial address or place name to autocomplete. | ||
* @param[near] A location for the search. | ||
* @param[layers] Optional layer filters. | ||
* @param[limit] The max number of addresses to return. A number between 1 and 100. | ||
* @param[country] An optional country filter. A string, the unique 2-letter country code. | ||
* @param[callback] A callback. | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a note that this version of the function is deprecated, and to prefer the above.
var callbackStatus: Radar.RadarStatus? = null | ||
var callbackAddresses: Array<RadarAddress>? = null | ||
|
||
Radar.autocomplete("brooklyn roasting", near, null, 10, "US",true) { status, addresses -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice
} | ||
|
||
/** | ||
* Autocompletes partial addresses and place names, sorted by relevance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a note that this version of the function is deprecated, and to prefer the one above.
No description provided.