Migrating to Drupal 8 geofields
Last updated on
30 April 2025
The "geofield_latlon" migration process plugin supports the migration of latitude/longitude values to drupal 8 field type "geofield" values.
As of this writing, this patch is needed.
You can see the issue here.
The source value passed to the geofield_latlon plugin needs to be an array whose first value is a latitude and second value is a longitude. For example, to populate a geofield named 'field_drupal8_geofield' when your source row contains "latitude" and "longitude" properties:
process:
field_drupal8_geofield:
plugin: geofield_latlon
source:
- latitude
- longitude
When migrating from a Drupal 7 site, the source property for a geofield is already in the proper format, so (if your field name is field_drupal7_geofield), simply do:
process:
field_drupal8_geofield:
plugin: geofield_latlon
source: field_drupal7_geofield
Help improve this page
Page status: Not set
You can:
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion