diff options
| -rw-r--r-- | ishtar_common/views_item.py | 5 | 
1 files changed, 3 insertions, 2 deletions
| diff --git a/ishtar_common/views_item.py b/ishtar_common/views_item.py index 80975eb0a..f5dedb8d5 100644 --- a/ishtar_common/views_item.py +++ b/ishtar_common/views_item.py @@ -1086,7 +1086,8 @@ def _format_geojson(rows, link_template):          return data      for row in rows:          feat = {'id': row[0], 'name': row[1]} -        if not row[2]: +        x, y = row[2], row[3] +        if not x or not y or x < -180 or x > 180 or y < -90 or y > 90:              data['no-geo'].append(feat)              continue          feature = { @@ -1094,7 +1095,7 @@ def _format_geojson(rows, link_template):              'properties': feat,              'geometry': {                  u'type': u'Point', -                u'coordinates': [row[2], row[3]] +                u'coordinates': [x, y]              }          }          data['features'].append(feature) | 
