I have a system where users are entering their address, and the geocode module is encoding it. If no geocode is possible, the field has the value NULL, which makes me unable to load certain pages with a view that uses openlayers to show some points.

Comments

esbenvb’s picture

StatusFileSize
new671 bytes

I made this patch to avoid the page loading problems...

phayes’s picture

Good catch esbenvb.

Also, we should just be calling "new Point($lon, $lat)" instead of constructing WKT then parsing it. :-/

batje’s picture

the patch worked for me. disadvantage is, i cant tell anymore i have an issue with my geofield data.

My data is there, its a 7MB multicollection of points and lines. The error occurs when i ask geofield for the centerpoint (in views).

phayes’s picture

batje, if you are dealing with geometries of that size I woud highly recommend installing GEOS.

See: https://github.com/phayes/geoPHP/wiki/GEOS

This may or may not fix the problem, but it's worth a shot just for performance reasons give the large geometries you are working with.