If you think the Android project android-async-google-places listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
Java Source Code
package io.github.axxiss.places.request;
//fromwww.java2s.comimport io.github.axxiss.places.callback.PlacesCallback;
import io.github.axxiss.places.enums.Params;
import io.github.axxiss.places.enums.Request;
/**
* Build the request for a localized search request. The {@link io.github.axxiss.places.Response}
* will contain an array of {@link io.github.axxiss .AsyncGooglePlaces.model.Place} as result.
*/publicclass TextSearch extends BaseSearch {
protected PlaceParams params = new PlaceParams();
public TextSearch(final String query, finaldouble lat, finaldouble lng, int radius) {
super(Request.TextSearch);
params.put(Params.Query, query);
setLocation(lat, lng);
params.put(Params.Radius, radius);
}
public TextSearch setKeyword(String keyword) {
params.put(Params.Keyword, keyword);
returnthis;
}
public TextSearch setLanguage(String lang) {
params.put(Params.Language, lang);
returnthis;
}
public TextSearch setRadius(int radius) {
params.put(Params.Radius, radius);
returnthis;
}
@Override
publicvoid sendRequest(PlacesCallback callback) {
PlacesClient.sendRequest(Request.TextSearch, params, callback);
}
}