Germany.php in Geolocation Field 8.3
File
modules/geolocation_google_maps/src/Plugin/geolocation/GeocoderCountryFormatting/Germany.php
View source
<?php
namespace Drupal\geolocation_google_maps\Plugin\geolocation\GeocoderCountryFormatting;
use Drupal\geolocation_google_maps\GoogleCountryFormattingBase;
class Germany extends GoogleCountryFormattingBase {
public function format(array $atomics) {
$address_elements = parent::format($atomics);
if (isset($atomics['streetNumber']) && $atomics['streetNumber'] && isset($atomics['route']) && $atomics['route']) {
$address_elements['addressLine1'] = $atomics['route'] . ' ' . $atomics['streetNumber'];
}
return $address_elements;
}
}