Back to project page android-google-places.
The source code is released under:
Copyright (c) 2012 Greg Marzouka Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Soft...
If you think the Android project android-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.
package org.gmarz.googleplaces.query; //from w ww . j a v a 2s . com import android.location.Location; public abstract class SearchQuery extends Query { private StringBuilder mTypes = new StringBuilder(); public void setLocation(double latitude, double longitude) { String location = Double.toString(latitude) + "," + Double.toString(longitude); mQueryBuilder.addParameter("location", location); } public void setLocation(Location location) { setLocation(location.getLatitude(), location.getLongitude()); } public void setRadius(int radius) { mQueryBuilder.addParameter("radius", Integer.toString(radius)); } public void setKey(String key) { mQueryBuilder.addParameter("key", key); } public void addType(String type) { mTypes.append(type); mTypes.append("|"); mTypes.deleteCharAt(mTypes.length() - 1); } @Override public String toString() { mQueryBuilder.addParameter("types", mTypes.toString()); return (getUrl() + mQueryBuilder.toString()); } }