PhotonSearchProvider

This is a proof of concept for using the photon search engine https://github.com/komoot/photon In testing it returned by far the best search results and can be run on a relatively modest server. This is using the demo server at https://photon.komoot.io/

Parameters

q

is the search string to use. Photon supports partial string searches and so this can be as little as 3 characters long.

latitude
longitude

If these are passed in, then results are prioritized based on that location.

limit

is the number of results to return.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
@Headers(value = ["Cache-control: max-age=0", "Connection: keep-alive"])
@GET(value = "api/")
abstract fun getSearchResults(@Query(value = "q") searchString: String, @Query(value = "lat") latitude: Double? = null, @Query(value = "lon") longitude: Double? = null, @Query(value = "lang") language: String = Locale.getDefault().language, @Query(value = "limit") limit: UInt, @Query(value = "location_bias_scale") bias: Float = 0.2f): Call<FeatureCollection>