From cf929a61bc6ff3c61abe7df110daf4eb901ec01d Mon Sep 17 00:00:00 2001 From: Lindsey DiLoreto Date: Sun, 22 Dec 2024 11:08:13 -0800 Subject: [PATCH] Added formatted address to geocoding lookup --- CHANGELOG.md | 3 +++ src/helpers/GeocodingHelper.php | 1 + 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index eaca713..500e25f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## Unreleased +### Added +- Added formatted address to geocoding lookup results. + ### Fixed - Patched bug in multisite migration. ([#127](https://github.com/doublesecretagency/craft-googlemaps/issues/127)) diff --git a/src/helpers/GeocodingHelper.php b/src/helpers/GeocodingHelper.php index 8a2ce93..8f81586 100644 --- a/src/helpers/GeocodingHelper.php +++ b/src/helpers/GeocodingHelper.php @@ -140,6 +140,7 @@ public static function restructureComponents(array $unformatted): array 'lat' => $lat, 'lng' => $lng, 'raw' => $unformatted, + 'formatted' => ($unformatted['formatted_address'] ?? null), ]; }