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

Introduce: pass array argument to geoloc #372

Merged
merged 6 commits into from
Nov 13, 2020

Conversation

ldlgds2
Copy link
Contributor

@ldlgds2 ldlgds2 commented Nov 28, 2019

Previously, only a latitude & longitude couple could be passed to geoloc
Now, a larger set in the array form of:
[{ lat: x_1, lng: y_1 }, ..., { lat: x_n, lng: y_n }] can be passed,
through a block as below:

geoloc do
  geoloc_array
end
Q A
Bug fix? yes
New feature? no
BC breaks? no
Related Issue Fix #370
Need Doc update no

Describe your change

Still accept simple latitude & longitude passing, but also an array of several hashes containing different coordinates.

What problem is this fixing?

Array passing of multiple latitudes & longitudes.

Previously, only a latitude & longitude couple could be passed to geoloc
Now, a large array in the form of:
`[{ lat: x_1, lng: y_1 }, ..., { lat: x_n, lng: y_n }]` can be passed,
through a block as below:
```
geoloc do
  geoloc_array
end
```
Travis seems not be passing otherwise.
@chloelbn
Copy link
Contributor

chloelbn commented Jan 2, 2020

Hi @ldlgds2, thanks a lot for your PR! Would you mind adding some test to reflect your changes?

Have a great day,

@ldlgds2
Copy link
Contributor Author

ldlgds2 commented Jan 2, 2020 via email

@ldlgds2
Copy link
Contributor Author

ldlgds2 commented Jan 6, 2020 via email

@chloelbn
Copy link
Contributor

chloelbn commented Jan 7, 2020

Hi @ldlgds2 ! We don't provide API keys on the fly, but it's totally fine if you create a new application and use it for your new tests

Altered model to accept arrays of coordinates as strings.
Also, modified model.
Last, added one test.
@ldlgds2
Copy link
Contributor Author

ldlgds2 commented Jan 27, 2020 via email

@ldlgds2
Copy link
Contributor Author

ldlgds2 commented Feb 28, 2020 via email

For Travis CI re-build.
@chloelbn chloelbn merged commit 5724790 into algolia:master Nov 13, 2020
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.

Support array as parameter for _geoloc
2 participants