You are here

public function PreprocessorBase::getPreparedReverseGeocodeValues in Geocoder 8.2

Same name and namespace in other branches
  1. 8.3 modules/geocoder_field/src/PreprocessorBase.php \Drupal\geocoder_field\PreprocessorBase::getPreparedReverseGeocodeValues()

Get prepared reverse geocode values.

@todo [cc]: When fixing reverse operation, clarify the interface for this method, including the method name.

Overrides PreprocessorInterface::getPreparedReverseGeocodeValues

File

modules/geocoder_field/src/PreprocessorBase.php, line 79

Class

PreprocessorBase
Base class for the Preprocessor plugin.

Namespace

Drupal\geocoder_field

Code

public function getPreparedReverseGeocodeValues(array $values = []) {
  return array_map(function ($value) {
    return array_combine([
      'lat',
      'lon',
    ], array_map('trim', explode(',', trim($value['value']), 2)));
  }, $values);
}