GeoDataApi

public interface GeoDataApi

This interface is deprecated.
The Google Play Services Places SDK is deprecated. A new SDK is available. See the client migration guide for more information.

Main entry point for the Google Places Geo Data API.

The Geo Data API provides access to Google's database of local place and business information. A place, generally, is defined as a particular physical space that has a name. The Geo Data API provides access to getting information about places by place ID, autocompleting a user's search query by name or address, and adding new places to Google's Places database. Most API methods involve a network round-trip to a Google server.

Some methods are subject to a quota limit, as mentioned in the description of the methods concerned. See the developer's guide for more information on quota and usage limits.

Public Method Summary

abstract PendingResult<PlaceBuffer>
addPlace(GoogleApiClient client, AddPlaceRequest addPlaceRequest)
This method is deprecated. The addPlace() method is deprecated as of June 30, 2017. This feature will be turned down on June 30, 2018, and will no longer be available after that date.
abstract PendingResult<AutocompletePredictionBuffer>
getAutocompletePredictions(GoogleApiClient client, String query, LatLngBounds bounds, AutocompleteFilter filter)
Returns autocomplete predictions for a query based on the names and addresses of places.
abstract PendingResult<PlaceBuffer>
getPlaceById(GoogleApiClient client, String... placeIds)
Returns Place objects for each of the given place IDs.
abstract PendingResult<PlacePhotoMetadataResult>
getPlacePhotos(GoogleApiClient client, String placeId)
Returns the metadata for up to 10 photos associated with a place.

Public Methods

public abstract PendingResult<PlaceBuffer> addPlace (GoogleApiClient client, AddPlaceRequest addPlaceRequest)

This method is deprecated.
The addPlace() method is deprecated as of June 30, 2017. This feature will be turned down on June 30, 2018, and will no longer be available after that date.

Adds a place to Google's Places database.

By adding a place, you can supplement the data in the Places database with data from your application. Added places are visible to your app immediately and are added to a moderation queue for possible inclusion in Google's Places database. For more information, see the developer's guide.

This method performs a network lookup.

Returns
  • A buffer containing a Place object representing the added place.

public abstract PendingResult<AutocompletePredictionBuffer> getAutocompletePredictions (GoogleApiClient client, String query, LatLngBounds bounds, AutocompleteFilter filter)

Returns autocomplete predictions for a query based on the names and addresses of places. For more information, see the developer's guide.

This method performs a network lookup.

Access to this method is subject to quota restrictions. See Usage Limits for more details.

Parameters
client
query The query string for which the autocomplete predictions are to be fetched. If null or empty, no predictions will be returned.
bounds A geographic bounds. If present, returned predictions will be biased towards places in this area.
filter A filter to use for restricting the returned predictions. If null, a filter with no constraints will be used.
Returns
  • A buffer containing a list of predictions for the query.

public abstract PendingResult<PlaceBuffer> getPlaceById (GoogleApiClient client, String... placeIds)

Returns Place objects for each of the given place IDs.

This method might return fewer places than requested if some of the given ids could not be resolved.

The maximum number of place IDs that will be returned is 20. If more than 20 places are requested, some of them may not be returned.

The Geo Data API may cache recently accessed places. If any of the requested places are not cached then this method will perform a network lookup.

Access to this method is subject to quota restrictions. See Usage Limits for more details.

Returns
  • A buffer containing the requested places.

public abstract PendingResult<PlacePhotoMetadataResult> getPlacePhotos (GoogleApiClient client, String placeId)

Returns the metadata for up to 10 photos associated with a place.

Photos are sourced from a variety of locations, including business owners and photos contributed by Google+ users. In most cases, these photos can be used without attribution, or will have the required attribution included as a part of the image. However, you must call getAttributions() to retrieve any additional attributions required, and display those attributions in your application wherever you display the image. A maximum of 10 photos is returned. For more information, see the developer's guide.

Multiple calls of this method will probably return the same photos each time. However, this is not guaranteed because the underlying data may have changed.

This method performs a network lookup.

Parameters
client
placeId The Place ID of the place
Returns
  • A PendingResult including the status of the request and (if successful) a buffer containing metadata about the photos available for the requested place.