com.googlecode.placesapiclient.client.argument.helper.ArgumentMapHelper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of places-api-client Show documentation
Show all versions of places-api-client Show documentation
Java client for Google Places service
The newest version!
package com.googlecode.placesapiclient.client.argument.helper;
import com.googlecode.placesapiclient.client.argument.ArgumentMap;
/**
* Helper that prepares ArgumentMap containing minimal required parameters to run selected method.
*
* Date: 21.06.13
* Time: 13:23
*/
public class ArgumentMapHelper {
public static ArgumentMap prepareArgumentMapForPlaceNerbySearch(String apiKey, double latitude, double longitude, Integer radius, Boolean sensor) {
ArgumentMap argumentMap = new ArgumentMap(apiKey);
argumentMap.putLocation(latitude, longitude);
argumentMap.putRadius(radius);
argumentMap.putSensor(sensor);
return argumentMap;
}
public static ArgumentMap prepareArgumentMapForTextSearch(String apiKey, String query, Boolean sensor) {
ArgumentMap argumentMap = new ArgumentMap(apiKey);
argumentMap.putQuery(query);
argumentMap.putSensor(sensor);
return argumentMap;
}
public static ArgumentMap prepareArgumentMapForPlaceRadarSearch(String apiKey, String placeTypes, double latitude, double longitude, Integer radius, Boolean sensor) {
ArgumentMap argumentMap = new ArgumentMap(apiKey);
argumentMap.putLocation(latitude, longitude);
argumentMap.putRadius(radius);
argumentMap.putSensor(sensor);
argumentMap.putPlaceTypes(placeTypes);
return argumentMap;
}
public static ArgumentMap prepareArgumentMapForPlaceDetails(String apiKey, String reference, Boolean sensor) {
ArgumentMap argumentMap = new ArgumentMap(apiKey);
argumentMap.putReference(reference);
argumentMap.putSensor(sensor);
return argumentMap;
}
public static ArgumentMap prepareArgumentMapForAddPlace(String apiKey, Boolean sensor) {
ArgumentMap argumentMap = new ArgumentMap(apiKey);
argumentMap.putSensor(sensor);
return argumentMap;
}
public static ArgumentMap prepareArgumentMapForPlaceAutocomplete(String apiKey, String input, Boolean sensor) {
ArgumentMap argumentMap = new ArgumentMap(apiKey);
argumentMap.putSensor(sensor);
argumentMap.putInput(input);
return argumentMap;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy