Geocoder is not generating my latitude and longitude
2 posts by 2 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: September 28, 2018 (RSS)
By Mikey - September 26, 2018
I have a section editor called "Events". In this section I have fields for:
address
city
state
zip_code
latitude
longitude
In my geocoder.php file I edited the following to include the "zip_code" field.
$GLOBALS['GEOCODER_ADDRESS_FIELD_COMBOS'] = array( // values should be ", " separated. alternates should be "/" separated.
'address, city, province/state, postcode/zipcode/zip_code/zip',
'city, province/state, postcode/zipcode/zip_code/zip',
'province/state, postcode/zipcode/zip_code/zip',
'address, city, province/state, country',
'address, city, province/state',
'postcode/zipcode/zip_code/zip/address',
);
However, when I create and save my event records, Geocoder does not auto-generate my latitude and longitude.
I tried changing the field zip_code to zipcode and zip, but neither of these worked either.
Is Geocoder's ability to auto-generate latitude and longitude for records dependent upon having a Google API with a credit card on file?
I'm stumped and can seem to get this working.
Zicky
Hey Zicky,
Is Geocoder's ability to auto-generate latitude and longitude for records dependent upon having a Google API with a credit card on file?
Google has recently updated the terms and conditions for their API, now you have to have a credit card on file and an API key to be able to use the plugin.
You can see the changes here:
https://developers.google.com/maps/documentation/geocoding/usage-and-billing
I'd also recommend upgrading to the latest version of the plugin.
Cheers,
Greg
PHP Programmer - interactivetools.com