diff --git a/src/Provider/GoogleMaps/GoogleMaps.php b/src/Provider/GoogleMaps/GoogleMaps.php index 85aa2a174..ae4689f64 100644 --- a/src/Provider/GoogleMaps/GoogleMaps.php +++ b/src/Provider/GoogleMaps/GoogleMaps.php @@ -249,6 +249,9 @@ private function fetchUrl($url, $locale, $limit) if (isset($result->geometry->location_type)) { $address->setLocationType($result->geometry->location_type); } + if (isset($result->types)) { + $address->setResultType($result->types); + } $results[] = $address; if (count($results) >= $limit) { diff --git a/src/Provider/GoogleMaps/Model/GoogleAddress.php b/src/Provider/GoogleMaps/Model/GoogleAddress.php index 96ccff9e9..184becbec 100644 --- a/src/Provider/GoogleMaps/Model/GoogleAddress.php +++ b/src/Provider/GoogleMaps/Model/GoogleAddress.php @@ -19,6 +19,11 @@ class GoogleAddress extends Address */ private $locationType; + /** + * @var array + */ + private $resultType = []; + /** * @param null|string $locationType * @@ -38,4 +43,24 @@ public function getLocationType() { return $this->locationType; } + + /** + * @return array + */ + public function getResultType() + { + return $this->resultType; + } + + /** + * @param array $resultType + * + * @return GoogleAddress + */ + public function setResultType(array $resultType) + { + $this->resultType = $resultType; + + return $this; + } }