Support for multivalued Geofield field

Created on 12 May 2025, about 1 month ago

Problem/Motivation

At the moment the View Geojson field doesn't support Geofield multivaue, and always assumes the geofield as a unique value, as clear from here: https://git.drupalcode.org/project/views_geojson/-/blob/8.x-1.x/src/Plug...
where the load method always expect a string value.
In case of multivalued, that $geofield will be an array ...

Steps to reproduce

Just create a Geojson View with a Geofield source that is multivalue.
The Geojson View won't return any value ...

Proposed resolution

Extend / Amend the Geojson->renderRow method so to correctly support Geofield multivaues, and take advantage of the GEOPHP library to collect multiple geometries into one GEOMETRYCOLLECTION (@see https://geophp.net).

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇮🇹Italy itamair

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024