PhotonAustria.php in Geolocation Field 8.3
File
modules/geolocation_leaflet/src/Plugin/geolocation/GeocoderCountryFormatting/PhotonAustria.php
View source
<?php
namespace Drupal\geolocation_leaflet\Plugin\geolocation\GeocoderCountryFormatting;
use Drupal\geolocation_leaflet\NominatimRoadFirstFormattingBase;
class PhotonAustria extends NominatimRoadFirstFormattingBase {
public function format(array $atomics) {
$address_elements = parent::format($atomics);
if (empty($address_elements['locality']) && !empty($atomics['state'])) {
$address_elements['locality'] = $atomics['state'];
}
return $address_elements;
}
}