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 w w . j av a 2 s. c o m import android.location.Location; public class NearbySearchQuery extends SearchQuery { public enum Ranking { Prominence, Distance }; public NearbySearchQuery(Location location) { this(location.getLatitude(), location.getLongitude()); } public NearbySearchQuery(double lat, double lon) { setLocation(lat, lon); setRadius(2500); // Default } public void setRanking(Ranking ranking) { mQueryBuilder.addParameter("rankby", ranking.toString()); } public void setKeyword(String keyword) { mQueryBuilder.addParameter("keyword", keyword); } public void setName(String name) { mQueryBuilder.addParameter("name", name); } public void setPageToken(String pageToken) { mQueryBuilder.addParameter("pagetoken", pageToken); } @Override public String getUrl() { return "https://maps.googleapis.com/maps/api/place/search/json"; } }