From d54d281f1750a05b662707b265e41e5f7309dc93 Mon Sep 17 00:00:00 2001 From: Sanj Date: Mon, 20 Feb 2012 23:58:23 +0530 Subject: [PATCH] silliness, create the geojson object correctly filtering out stops with empty geoms --- chaloBEST/static/js/editstops.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chaloBEST/static/js/editstops.js b/chaloBEST/static/js/editstops.js index dbfeb7f..40db688 100644 --- a/chaloBEST/static/js/editstops.js +++ b/chaloBEST/static/js/editstops.js @@ -58,12 +58,12 @@ var API_BASE = "/1.0/", var stops = stopsGeojson.features; var $stopsList = getStopsList(stops); var stopsWithGeom = []; - $.each(stopsGeojson.stops, function(i,v) { + $.each(stops, function(i,v) { if (!$.isEmptyObject(v.geometry)) { stopsWithGeom.push(v); } }); - stopsGeojson.stops = stopsWithGeom; + stopsGeojson.features = stopsWithGeom; var currFeatures = jsonLayer.features; jsonLayer.removeFeatures(currFeatures); jsonLayer.addFeatures(geojson_format.read(stopsGeojson));