Interface PlacesProvider

All Known Implementing Classes:
GooglePlacesProvider, PhotonPlacesProvider

public interface PlacesProvider
A place search service behind PlacesAutocomplete. PhotonPlacesProvider needs no key; GooglePlacesProvider uses the Google Places API (New).
  • Method Details

    • autocomplete

      AsyncResource<List<PlacePrediction>> autocomplete(String input, String sessionToken, LatLng bias)

      Suggests places for partial input.

      Parameters
      • input: what the user typed

      • sessionToken: groups the requests of one search for billing; may be ignored

      • bias: prefers results near this point, may be null

      Returns

      the suggestions

    • getDetails

      AsyncResource<PlaceDetails> getDetails(String placeId, String sessionToken)

      Resolves a suggestion. This ends the session the token names.

      Parameters
      • placeId: the ID of a prediction

      • sessionToken: the token used for the autocomplete requests

      Returns

      the details