I am making an android app which determines the user's location based on his latitude and longitudinal position. So I am using the Google Maps reverse geocoder. But the problem is that Google says that one can make only 2500 API calls per day. But I expect my users to be a lot more than 2500. So is there an alternative to Google Maps reverse geocoder which lets one make unlimited API calls per day?
The number 2500 is per user (I think per IP). If you don't want to do automated queries (which are against the policy) 2500 should be more than enough for a single user.
"As geocoding limits are per user session, there is no risk that your application will reach a global limit as your userbase grows."
"The 2,500 request limit is per IP address."
from
https://developers.google.com/maps/articles/geocodestrat#client
You can use via Google API like insert your longitude and latitude with parameter and send request to the server and server giving the response with address.
public static String getAddressUrl(Context context) {
String responseText = null;
// String latitude = "38.89";
// String longitude = "-77.03";
String googleurl = "http://maps.google.com/maps/geo?";
Log.v(TAG , "Latitude is: " + latitude + "Longitude is:" + longitude);
StringBuilder sbuilder = new StringBuilder();
sbuilder.append(googleurl);
sbuilder.append("q = " + latitude + "," + longitude);
sbuilder.append("&output = responseText&sensor = true");
String url = sbuilder.toString();
Log.v(TAG, "url is: " + url);
try {
DefaultHttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost(url);
HttpResponse httpresponse = httpclient.execute(httppost);
HttpEntity httpentity = httpresponse.getEntity();
InputStream is = httpentity.getContent();
BufferedReader reader = new BufferedReader(
new InputStreamReader(is, "iso-8859-1"), 8);
StringBuilder sb = new StringBuilder();
String line = null;
while((line = reader.readLine()) != null) {
sb.append(line + "\n");
}
is.close();
responseText = sb.toString();
}
catch(ClientProtocolException e) {
e.printStackTrace();
}
catch (IOException e) {
e.printStackTrace();
}
return responseText;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With