Hi,

I have many projects content types displaying a google map from the geolocation field.
I am importing my projects with Feed module. And the geolocation field is the only one that do not accept to import null values.
So with some php I add zero to geolocation fields.

Now with geolocation values being zero I get a marker lost in the Ocean. In views if I check 'don't show if no results' and 'consider 0 as no results' I still get my map lost in the ocean.
I have to edit the projects and delete the geolocation values in order not to get a lost map.

Any idea? I just want to hide the map if values are null or 0.

Comments

hutch’s picture

Filter on lat and lng, "not equal to 0" will keep them out of your view, but better to prevent them being imported in the first place, I am not sure but I think the feeds_tamper module might do it with a "required field" plugin applied to lat and lng, this might also solve your "not null" error. I have not tried this with Geolocation module.

fabien77’s picture

I cannot filter on lat and lng because it would filter all my content not just the map field.

I tried the "required field" with feeds_tamper but it doesn't import my content when the required geolocation field is not present.

If I don't use plugin on feeds_tamper I get this error when importing
SQLSTATE[01000]: Warning: 1265 Data truncated for column 'field_geo_station_lat' at row 1

derjochenmeyer’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)