public interface GooglePlacesInterface extends Types, Statuses
| Modifier and Type | Field and Description |
|---|---|
static String |
API_URL
The URL of which Google Places API is located.
|
static String |
ARRAY_ADDRESS_COMPONENTS
An array containing each element in a places full address
|
static String |
ARRAY_ALT_IDS
Defines alternate entries for a specified place.
|
static String |
ARRAY_ASPECTS
Array of aspects of a review
|
static String |
ARRAY_MATCHED_SUBSTRINGS
Used for matching matched substrings for autocompletion
|
static String |
ARRAY_PERIODS
Signifies the hours of operation of a place
|
static String |
ARRAY_PHOTOS
Array containing photo information
|
static String |
ARRAY_PREDICTIONS
Array of autocomplete predictions
|
static String |
ARRAY_RESULTS
Array for results
|
static String |
ARRAY_REVIEWS
Array of reviews of a Place
|
static String |
ARRAY_TERMS
Array of terms describing a autocomplete prediction description
|
static String |
ARRAY_TYPES
Types of place
|
static String |
BOOLEAN_OPENED
If the place is opened now
|
static int |
DEFAULT_RESULTS
The default amount of results that will be returned in a single request.
|
static String |
DOUBLE_LATITUDE
Latitude of place
|
static String |
DOUBLE_LONGITUDE
Longitude of place
|
static String |
DOUBLE_RATING
The "rating" of the place
|
static String |
INTEGER_ACCURACY
Accuracy of location, in meters
|
static String |
INTEGER_DAY
Day represented by an int 0-6, starting with Sunday
|
static String |
INTEGER_HEIGHT
Used for describing a photo's height
|
static String |
INTEGER_LENGTH
Used for autocomplete substring length
|
static String |
INTEGER_OFFSET
Used for autocomplete predictions
|
static String |
INTEGER_PRICE_LEVEL
How expensive the place is
|
static String |
INTEGER_RATING
Reviews use integer ratings
|
static String |
INTEGER_UTC_OFFSET
Minutes that a location is of from UTC
|
static String |
INTEGER_WIDTH
Used for describing a photo's width
|
static String |
LONG_TIME
Used for the date of a review
|
static int |
MAX_PHOTO_SIZE |
static int |
MAXIMUM_PAGE_RESULTS
The maximum amount of results that can be on one single page.
|
static double |
MAXIMUM_RADIUS
The maximum search radius for places.
|
static int |
MAXIMUM_RESULTS
The maximum results that can be returned.
|
static String |
METHOD_ADD |
static String |
METHOD_AUTOCOMPLETE |
static String |
METHOD_DELETE |
static String |
METHOD_DETAILS |
static String |
METHOD_NEARBY_SEARCH |
static String |
METHOD_QUERY_AUTOCOMPLETE |
static String |
METHOD_RADAR_SEARCH |
static String |
METHOD_TEXT_SEARCH |
static String |
OBJECT_CLOSE
The end of a period
|
static String |
OBJECT_GEOMETRY
Geographic information
|
static String |
OBJECT_HOURS
Contains open_now
|
static String |
OBJECT_LOCATION
Contains latitude and longitude coordinates
|
static String |
OBJECT_OPEN
The beginning of a period
|
static String |
OBJECT_RESULT
Used for responses with single results
|
static String |
STRING_ADDRESS
The address of the place
|
static String |
STRING_AUTHOR_NAME
Name of a review author
|
static String |
STRING_AUTHOR_URL
Url of author
|
static String |
STRING_DESCRIPTION
Description of autocomplete prediction
|
static String |
STRING_ERROR_MESSAGE
A message that may or may not be present when an error occurs.
|
static String |
STRING_ICON
Url to the icon to represent this place
|
static String |
STRING_INTERNATIONAL_PHONE_NUMBER
The phone number of the place with an international country code
|
static String |
STRING_LANGUAGE
Language for review localization
|
static String |
STRING_LONG_NAME
Represents an address component's long name
|
static String |
STRING_NAME
The name of the place
|
static String |
STRING_NEXT_PAGE_TOKEN
A token used for getting the next page of results
|
static String |
STRING_PHONE_NUMBER
The phone number of the place
|
static String |
STRING_PHOTO_REFERENCE
A reference to an actual photo
|
static String |
STRING_PLACE_ID
The unique, stable, identifier for this place
|
static String |
STRING_SCOPE
Defines what scope a location resides in.
|
static String |
STRING_SHORT_NAME
Represents an address component's short name
|
static String |
STRING_STATUS
A root element to indicate the status of the query.
|
static String |
STRING_TEXT
Review content
|
static String |
STRING_TIME
A time represented by an hhmm format
|
static String |
STRING_TYPE
Used for singular types in review aspects
|
static String |
STRING_TYPES
Restricts the results to places matching at least one of the specified types.
|
static String |
STRING_URL
The url for an event at a place
|
static String |
STRING_VALUE
Used for autocomplete terms
|
static String |
STRING_VICINITY
The vicinity of which the place can be found (sometimes replaces formatted_address)
|
static String |
STRING_WEBSITE
The website associated with a place
|
TYPE_ACCOUNTING, TYPE_AIRPORT, TYPE_AMUSEMENT_PARK, TYPE_AQUARIUM, TYPE_ART_GALLERY, TYPE_ATM, TYPE_BAKERY, TYPE_BANK, TYPE_BAR, TYPE_BEAUTY_SALON, TYPE_BICYCLE_STORE, TYPE_BOOK_STORE, TYPE_BOWLING_ALLEY, TYPE_BUS_STATION, TYPE_CAFE, TYPE_CAMPGROUND, TYPE_CAR_DEALER, TYPE_CAR_RENTAL, TYPE_CAR_REPAIR, TYPE_CAR_WASH, TYPE_CASINO, TYPE_CEMETERY, TYPE_CHURCH, TYPE_CITY_HALL, TYPE_CLOTHING_STORE, TYPE_CONVENIENCE_STORE, TYPE_COURTHOUSE, TYPE_DENTIST, TYPE_DEPARTMENT_STORE, TYPE_DOCTOR, TYPE_ELECTRICIAN, TYPE_ELECTRONICS_STORE, TYPE_EMBASSY, TYPE_ESTABLISHMENT, TYPE_FINANCE, TYPE_FIRE_STATION, TYPE_FLORIST, TYPE_FOOD, TYPE_FUNERAL_HOME, TYPE_FURNITURE_STORE, TYPE_GAS_STATION, TYPE_GENERAL_CONTRACTOR, TYPE_GROCERY_OR_SUPERMARKET, TYPE_GYM, TYPE_HAIR_CARE, TYPE_HARDWARE_STORE, TYPE_HEALTH, TYPE_HINDU_TEMPLE, TYPE_HOME_GOODS_STORE, TYPE_HOSPITAL, TYPE_INSURANCE_AGENCY, TYPE_JEWELRY_STORE, TYPE_LAUNDRY, TYPE_LAWYER, TYPE_LIBRARY, TYPE_LIQUOR_STORE, TYPE_LOCAL_GOVERNMENT_OFFICE, TYPE_LOCKSMITH, TYPE_LODGING, TYPE_MEAL_DELIVERY, TYPE_MEAL_TAKEAWAY, TYPE_MOSQUE, TYPE_MOVIE_RENTAL, TYPE_MOVIE_THEATER, TYPE_MOVING_COMPANY, TYPE_MUSEUM, TYPE_NIGHT_CLUB, TYPE_PAINTER, TYPE_PARK, TYPE_PARKING, TYPE_PET_STORE, TYPE_PHARMACY, TYPE_PHYSIOTHERAPIST, TYPE_PLACE_OF_WORSHIP, TYPE_PLUMBER, TYPE_POLICE, TYPE_POST_OFFICE, TYPE_REAL_ESTATE_AGENCY, TYPE_RESTAURANT, TYPE_ROOFING_CONTRACTOR, TYPE_RV_PARK, TYPE_SCHOOL, TYPE_SHOE_STORE, TYPE_SHOPPING_MALL, TYPE_SPA, TYPE_STADIUM, TYPE_STORAGE, TYPE_STORE, TYPE_SUBWAY_STATION, TYPE_SYNAGOGUE, TYPE_TAXI_STAND, TYPE_TRAIN_STATION, TYPE_TRAVEL_AGENCY, TYPE_UNIVERSITY, TYPE_VETERINARY_CARE, TYPE_ZOOSTATUS_INVALID_REQUEST, STATUS_NOT_FOUND, STATUS_OK, STATUS_OVER_QUERY_LIMIT, STATUS_REQUEST_DENIED, STATUS_UNKNOWN_ERROR, STATUS_ZERO_RESULTS| Modifier and Type | Method and Description |
|---|---|
Place |
addPlace(PlaceBuilder builder,
boolean returnPlace,
Param... extraParams)
Adds a new place to the Places API and gets the newly created place if returnPlace is set to true.
|
void |
deletePlace(Place place,
Param... extraParams)
Deletes the specified place.
|
void |
deletePlaceById(String placeId,
Param... extraParams)
Deletes the place of the specified placeId.
|
String |
getApiKey()
Returns the API key associated with this GooglePlaces object.
|
List<Place> |
getNearbyPlaces(double lat,
double lng,
double radius,
int limit,
Param... extraParams)
Returns the places at the specified latitude and longitude within the specified radius.
|
List<Place> |
getNearbyPlaces(double lat,
double lng,
double radius,
Param... extraParams)
Returns the places at the specified latitude and longitude within the specified radius.
|
List<Place> |
getNearbyPlacesRankedByDistance(double lat,
double lng,
int limit,
Param... params)
Returns the places at the specified latitude and longitude in order of proximity to the specified location.
|
List<Place> |
getNearbyPlacesRankedByDistance(double lat,
double lng,
Param... params)
Returns the places at the specified latitude and longitude in order of proximity to the specified location.
|
Place |
getPlaceById(String placeId,
Param... extraParams)
Returns the place specified by the 'placeid'.
|
List<Prediction> |
getPlacePredictions(String input,
int offset,
int lat,
int lng,
int radius,
Param... extraParams)
Returns a list of auto-complete predictions for searching for a specific place.
|
List<Prediction> |
getPlacePredictions(String input,
int offset,
Param... extraParams)
Returns a list of auto-complete predictions for searching for a specific place.
|
List<Prediction> |
getPlacePredictions(String input,
Param... extraParams)
Returns a list of auto-complete predictions for searching for a specific place.
|
List<Place> |
getPlacesByQuery(String query,
int limit,
Param... extraParams)
Returns the places that match the specified search query.
|
List<Place> |
getPlacesByQuery(String query,
Param... extraParams)
Returns the places that match the specified search query.
|
List<Place> |
getPlacesByRadar(double lat,
double lng,
double radius,
int limit,
Param... extraParams)
Returns the places at the specified latitude and longitude according to the "radar" method specified by Google
Places API.
|
List<Place> |
getPlacesByRadar(double lat,
double lng,
double radius,
Param... extraParams)
Returns the places at the specified latitude and longitude according to the "radar" method specified by Google
Places API.
|
List<Prediction> |
getQueryPredictions(String input,
int offset,
int lat,
int lng,
int radius,
Param... extraParams)
Returns a list of auto-complete predictions for searching for a place by a query.
|
List<Prediction> |
getQueryPredictions(String input,
int offset,
Param... extraParams)
Returns a list of auto-complete predictions for searching for a place by a query.
|
List<Prediction> |
getQueryPredictions(String input,
Param... extraParams)
Returns a list of auto-complete predictions for searching for a place by a query.
|
RequestHandler |
getRequestHandler()
Returns the interface that handles HTTP requests to Google's server.
|
boolean |
isDebugModeEnabled()
Returns true if the client is running in debug mode.
|
void |
setApiKey(String apiKey)
Sets the API key associated with this GooglePlaces object.
|
void |
setDebugModeEnabled(boolean debugModeEnabled)
Sets if the client should run in debug mode.
|
void |
setRequestHandler(RequestHandler requestHandler)
Sets the request handler to delegate HTTP traffic.
|
static final String API_URL
static final int MAXIMUM_PAGE_RESULTS
static final int DEFAULT_RESULTS
static final int MAXIMUM_RESULTS
static final double MAXIMUM_RADIUS
static final String METHOD_NEARBY_SEARCH
static final String METHOD_TEXT_SEARCH
static final String METHOD_RADAR_SEARCH
static final String METHOD_DETAILS
static final String METHOD_ADD
static final String METHOD_DELETE
static final String METHOD_AUTOCOMPLETE
static final String METHOD_QUERY_AUTOCOMPLETE
static final int MAX_PHOTO_SIZE
static final String ARRAY_TYPES
static final String ARRAY_RESULTS
static final String ARRAY_PERIODS
static final String ARRAY_PHOTOS
static final String ARRAY_ADDRESS_COMPONENTS
static final String ARRAY_REVIEWS
static final String ARRAY_ASPECTS
static final String ARRAY_PREDICTIONS
static final String ARRAY_TERMS
static final String ARRAY_MATCHED_SUBSTRINGS
static final String ARRAY_ALT_IDS
static final String BOOLEAN_OPENED
static final String DOUBLE_LATITUDE
static final String DOUBLE_LONGITUDE
static final String DOUBLE_RATING
static final String INTEGER_PRICE_LEVEL
static final String INTEGER_DAY
static final String INTEGER_WIDTH
static final String INTEGER_HEIGHT
static final String INTEGER_RATING
static final String INTEGER_UTC_OFFSET
static final String INTEGER_ACCURACY
static final String INTEGER_OFFSET
static final String INTEGER_LENGTH
static final String LONG_TIME
static final String OBJECT_RESULT
static final String OBJECT_GEOMETRY
static final String OBJECT_LOCATION
static final String OBJECT_HOURS
static final String OBJECT_OPEN
static final String OBJECT_CLOSE
static final String STRING_PLACE_ID
static final String STRING_ICON
static final String STRING_NAME
static final String STRING_ADDRESS
static final String STRING_VICINITY
static final String STRING_URL
static final String STRING_STATUS
static final String STRING_ERROR_MESSAGE
static final String STRING_NEXT_PAGE_TOKEN
static final String STRING_PHONE_NUMBER
static final String STRING_INTERNATIONAL_PHONE_NUMBER
static final String STRING_WEBSITE
static final String STRING_TIME
static final String STRING_PHOTO_REFERENCE
static final String STRING_LONG_NAME
static final String STRING_SHORT_NAME
static final String STRING_AUTHOR_NAME
static final String STRING_AUTHOR_URL
static final String STRING_LANGUAGE
static final String STRING_TEXT
static final String STRING_DESCRIPTION
static final String STRING_VALUE
static final String STRING_TYPE
static final String STRING_TYPES
static final String STRING_SCOPE
Scope,
Constant Field Valuesboolean isDebugModeEnabled()
void setDebugModeEnabled(boolean debugModeEnabled)
debugModeEnabled - true if in debug modeString getApiKey()
void setApiKey(String apiKey)
apiKey - to setRequestHandler getRequestHandler()
void setRequestHandler(RequestHandler requestHandler)
requestHandler - to handle HTTP trafficList<Place> getNearbyPlaces(double lat, double lng, double radius, int limit, Param... extraParams)
MAXIMUM_PAGE_RESULTS, multiple HTTP GET requests may be made if necessary.lat - latitudelng - longituderadius - radiuslimit - the maximum amount of places to returnextraParams - any extra parameters to include in the request URLList<Place> getNearbyPlaces(double lat, double lng, double radius, Param... extraParams)
DEFAULT_RESULTS will be returned and no more than one HTTP GET request will be sent.lat - latitudelng - longituderadius - radiusextraParams - any extra parameters to include in the request URLList<Place> getNearbyPlacesRankedByDistance(double lat, double lng, int limit, Param... params) throws GooglePlacesException
MAXIMUM_PAGE_RESULTS, multiple HTTP GET requests may be made if
necessary. One or more of the parameters 'keyword', 'name', or 'types' is required or else a
GooglePlacesException will be thrown.lat - latitudelng - longitudelimit - the maximum amount of places to returnparams - parameters to append to url, one or more being 'keyword', 'name', or 'types'GooglePlacesException - if 'keyword', 'name' or 'types' is not included.List<Place> getNearbyPlacesRankedByDistance(double lat, double lng, Param... params) throws GooglePlacesException
DEFAULT_RESULTS will be returned and no more than one HTTP GET request will be sent. One or
more of the parameters 'keyword', 'name', or 'types' is required or else a
GooglePlacesException will be thrown.lat - latitudelng - longitudeparams - parameters to append to url, one or more being 'keyword', 'name', or 'types'GooglePlacesException - if 'keyword', 'name' or 'types' is not included.List<Place> getPlacesByQuery(String query, int limit, Param... extraParams)
MAXIMUM_PAGE_RESULTS, multiple HTTP GET requests may be made if necessary.query - search querylimit - the maximum amount of places to returnextraParams - any extra parameters to include in the request URLList<Place> getPlacesByQuery(String query, Param... extraParams)
DEFAULT_RESULTS will be returned
and no more than one HTTP GET request will be sent. The 'sensor' parameter defaults to false.query - search queryextraParams - any extra parameters to include in the request URLList<Place> getPlacesByRadar(double lat, double lng, double radius, int limit, Param... extraParams)
MAXIMUM_PAGE_RESULTS, multiple HTTP GET requests
may be made if necessary.lat - latitudelng - longituderadius - radiuslimit - the maximum amount of places to returnextraParams - any extra parameters to include in the request URLList<Place> getPlacesByRadar(double lat, double lng, double radius, Param... extraParams)
DEFAULT_RESULTS will be returned and no more than one HTTP GET request will
be sent.lat - latitudelng - longituderadius - radiusextraParams - any extra parameters to include in the request URLPlace getPlaceById(String placeId, Param... extraParams)
placeId - to getextraParams - params to append to urlPlace addPlace(PlaceBuilder builder, boolean returnPlace, Param... extraParams)
builder - to get place details fromreturnPlace - true if the newly created place should be returnedextraParams - to append to request urlvoid deletePlaceById(String placeId, Param... extraParams)
placeId - place idextraParams - params to append to urlvoid deletePlace(Place place, Param... extraParams)
place - to deleteList<Prediction> getPlacePredictions(String input, int offset, int lat, int lng, int radius, Param... extraParams)
input - user inputoffset - offset of text caretlat - latitudelng - longituderadius - radiusextraParams - to append to request urlList<Prediction> getPlacePredictions(String input, int offset, Param... extraParams)
input - user inputoffset - offset of text caretList<Prediction> getPlacePredictions(String input, Param... extraParams)
input - user inputextraParams - extra params to include in urlList<Prediction> getQueryPredictions(String input, int offset, int lat, int lng, int radius, Param... extraParams)
input - user inputextraParams - to append to request urlList<Prediction> getQueryPredictions(String input, int offset, Param... extraParams)
input - user inputoffset - offset of text caretextraParams - extra params to append to urlList<Prediction> getQueryPredictions(String input, Param... extraParams)
input - user inputextraParams - extra parameters to append to urlCopyright © 2014–2015. All rights reserved.