Question

I'm storing all my location info (longitude and latitudes) in my database by getting the long/lat from client side geocoding to avoid the 2500 max geocoding daily limit.

I just want to confirm that using the near method provided by the geocoder gem when longitude and latitudes are provided does not make an external call to the Google Geocoding api.

For example:

Location.near([37.77, -122.41], 15)

where the location model has latitude and longitude for each location already stored should not have any need to make an external call. Right?

Thanks!

Was it helpful?

Solution

It has to geocode "San Franscisco, CA" to figure out their longitude and latitude. Then using those it creates the sql query which will be able to get that information.

Update: If you are using Lat and Lng, it won't query Google Apis.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top