geofield php objects don't contain the 'wkt' property anymore. for a geojson view that uses geofield as data source this means, the current code doesn't work but just outputs null values.

the attached patch fixed the problem in my case.

Comments

jeffschuler’s picture

Thanks dasjo!
Should we take care to maintain compatibility with earlier/non-dev versions of Geofield?

dasjo’s picture

i'm not sure here. maybe it doesn't break earlier versions?

Sinovchi’s picture

Thank you jeffschuler for your hard work in maintaining of this module. This is awasome module!
Thanks dasjo for this patch. It works perfect with Geofiled 7.x-2.x-dev. Openlayer is not compatible with 7x.-2 version of Geofield, yet and this module now becomes very important with this patch.

dasjo’s picture

biarr, glad you like it.

i think we still need to test if the patch breaks anything with older geofield versions

Brandonian’s picture

This definitely would break with the current stable release of Geofield. If you want to support either version, you should check to see if the geom column exists, and if not, use the current code that currently exists in Views GeoJSON.

Brandonian’s picture

StatusFileSize
new928 bytes

Attached is a patch that *should* work with both the 1.x and 2.x branches of Geofield. I've tested it with the 2.x branch, if someone could test it with 1.x, that would be awesome.

dasjo’s picture

#6 works for me using the 7.x-2.x branch of Geofield, thanks

pol’s picture

Issue summary: View changes
Status: Needs review » Fixed

Committed, thanks !

  • Pol committed dbc552c on authored by Brandonian
    Issue #1794848 by Brandonian, dasjo: Fixed Recent geofield changes...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.