Direkt zum Inhalt

Devbits

Kleine Code-Schnipsel aus unserem Alltag mit Drupal, PHP und DevOps: Problem, Lösung, Code.

15.01.2026 | Lothar Ferreira Neumann

How to migrate latitude & longitude geodata into a unified geocode field

Migrating geographic coordinate data from the geofield module into a unified geofield requires correct source field mapping.

field_geofield:
  plugin: geofield_latlon
  source:
    - field_latitude
    - field_longitude

Issue:

Migrating geographic coordinate data from the geofield module into a unified geofield requires correct source field mapping.

Solution:

The code uses the geofield_latlon plugin to combine latitude and longitude fields in the specified order for proper geofield migration.

See the Drupal documentation for more info about the topic.