Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This patch for Geolocation field module provides a destination handler which exposes geolocation fields for mapping.
Geolocation field requires both latitude and longitude values, so it doesn't make sense to use the primary value, i.e. map to field itself.
In order to use it, please map values to the subfields (mapping to the field won't work)
Fields
lat - Geolocation field latitude value
lng - Geolocation field longitude value
language - Geolocation field value language
Example
// Correct way: map to subfields.
$this->addFieldMapping('field_geolocation:lat', 'geolocation_lat');
$this->addFieldMapping('field_geolocation:lng', 'geolocation_lng');
// Incorrect way: map to the field itself.
$this->addFieldMapping('field_geolocation', 'geolocation');