chercheville v0.2.0 ChercheVille.Search

A GenServer providing city search capabilities.

Summary

Functions

Returns a specification to start this module under a supervisor

Search cities nearest to latitude and longitude

Search for cities matching search_string

Functions

child_spec(arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

coordinates(latitude, longitude, limit \\ 10)

Search cities nearest to latitude and longitude.

Returns a list of ChercheVille.City records no larger than limit and sorted by distance from latitude and longitude.

init(args)
start_link(state \\ [])
text(search_string, limit \\ 10)

Search for cities matching search_string.

Returns a list of ChercheVille.City records no larger than limit. Equally relevant cities get sorted by descending population.