Please note that this documentation is for the most recent version of this extension. It may not be relevant for older versions. Related documentation can be found in the documentation directory of the extension.
My addresses don’t have geo coordinates yet – can I determine them automatically?
Overview
Yes. With the Address Manager Pro edition you can automatically determine missing geo coordinates (latitude/longitude) using the Google Maps Geocoding API. The Pro package ships a console command that iterates your addresses and stores the coordinates.
Prerequisites
- Address Manager Pro is installed and active.
- A valid Google Cloud API key for the Geocoding API (billing enabled in Google Cloud).
- Your address data is sufficiently complete (e.g. street, postal code, city, country) so the lookup returns clear results.
CLI usage
Run the command via TYPO3’s CLI:
vendor/bin/typo3 address_manager_pro:geocoding --apiKey="<YOUR_API_KEY>" [--useFields="address,postal_code,city,country"] [--limit=<NUMBER>]
Short options:
-ais--apiKey-fis--useFields-lis--limit
Options explained
--apiKey(required): Your Google Geocoding API key.--useFields(optional, default:address,postal_code,city,country): Comma-separated list of address fields that will be concatenated for the search query. Adjust if you want to includeregion(state).--limit(optional): Limits the number of processed records.0means “all”.
Examples
- Process all addresses without coordinates:
vendor/bin/typo3 address_manager_pro:geocoding -a "AIza..." - Process only the first 50 records:
vendor/bin/typo3 address_manager_pro:geocoding -a "AIza..." -l 50 - Use a custom field order (including state/region):
vendor/bin/typo3 address_manager_pro:geocoding -a "AIza..." -f "address,postal_code,city,region,country"
Result
The command resolves coordinates for each address without existing values and stores them in map_latitude and map_longitude. The CLI output shows how many addresses were processed and whether coordinates were saved.
Tips
- Improve precision: The more precise the fields (street + house no., postal code, city, country), the better the results.
- Watch rate limits: The Google API enforces quotas. For larger datasets, consider multiple runs using
--limit. - Logging/Debug: The command logs a short status per address. Watch for error messages (e.g. missing fields) to improve data quality.
Troubleshooting
- “No API Key given”: You did not provide
--apiKey. - “Address can't be found”: Check
--useFieldsand your data quality (street/postal code/city/country). Add missing fields and try again. - No changes stored: Only addresses without coordinates are processed. Remove test values or use fresh records if needed.
