Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

KennyHuRadar
Copy link
Contributor

No description provided.

var callbackStatus: Radar.RadarStatus? = null
var callbackAddresses: Array<RadarAddress>? = null

Radar.autocomplete("brooklyn roasting", country="UK", expandUnits = true) { status, addresses ->
Copy link
Contributor

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

Copy link
Contributor

@lmeier lmeier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

few small things

Comment on lines 3149 to 3160
/**
* 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.
*/
Copy link
Contributor

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 ->
Copy link
Contributor

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.
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants