Closed victorbstan closed 9 years ago
Doing a regular geocode or a reverse geocode with the maps API is not what they set limits on, so you wouldn't be saving anything. Google counts map loads.
From Google:
The degree to which a user interacts with a map once it has been loaded has no impact on the usage limits.
On a related note, if you want to access the lat/long, you can get it from your geocomplete result like this:
$('input').geocomplete()
.bind('geocode:result', function(event, result) {
var loc = result.geometry.location;
var lat = loc.lat(); // Latitude
var lng = loc.lng(); // Longitude
});
But more importantly, you get 25,000 maps loads per day for free. Are you really going to exceed that? If you are, you're probably making money from your app anyway (at least I hope so with traffic like that).
Ah OK, thats good then :+1: I'm already using your example for displaying maps from autocomplete results and that works great for me. I was also saving the lat/lng data and wanted to fetch the map in that case without a geocode query, but if you're right, then that shouldn't matter. Currently I just re-run the geocode query on the saved formatted address and the map shows up again, so if that doesn't make a difference in API usage, I'm happy :) Thanks again!
Is there a way to feed in lat/lng into your geocode plugin and get the map displayed in the same way that calling .geocomplete does? I feel like re-issuing a geocompletion request each time i'm displaying a map, I would make a call to the API, and it would count towards my usage limit, or?