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.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 1794848-geofield20.patch | 928 bytes | Brandonian |
| views_geojson_geofield_changes.patch | 1.01 KB | dasjo |
Comments
Comment #1
jeffschulerThanks dasjo!
Should we take care to maintain compatibility with earlier/non-dev versions of Geofield?
Comment #2
dasjoi'm not sure here. maybe it doesn't break earlier versions?
Comment #3
Sinovchi commentedThank 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.
Comment #4
dasjobiarr, glad you like it.
i think we still need to test if the patch breaks anything with older geofield versions
Comment #5
Brandonian commentedThis 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.
Comment #6
Brandonian commentedAttached 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.
Comment #7
dasjo#6 works for me using the 7.x-2.x branch of Geofield, thanks
Comment #8
polCommitted, thanks !