@Service public class LocationService extends Object
| Constructor and Description |
|---|
LocationService() |
| Modifier and Type | Method and Description |
|---|---|
Location |
fetchGooglePlaceAndConvertToLocation(String googlePlaceId)
Calls the Google Places API to get the specified Place before converting it into our
internal representation of a Location and returning it.
|
List<com.google.maps.model.AutocompletePrediction> |
searchForGooglePlace(String searchString)
Directly searches the Google Places API with the given search string.
|
public List<com.google.maps.model.AutocompletePrediction> searchForGooglePlace(String searchString) throws FailedDependencyException
searchString - The String with which to search the Google Place API.FailedDependencyException - if something goes wrong while trying to connect to Google Place APIpublic Location fetchGooglePlaceAndConvertToLocation(String googlePlaceId) throws NotFoundException
googlePlaceId - Google's native placeId that we'd like to fetch details for. Likely obtained through search.NotFoundException - if Google does not have a Place with the given ID.Copyright © 2019. All rights reserved.